I’ve produced a GraphViz dot file graph representing all the standard Apple specified UTTypes available on Mac OS X 10.4. There’s a lot of information to be represented on one page of the graph. See for yourself: Output PDF file: UTTypes.pdf Source DOT file: uttypes.dot Maybe someone who is more familiar with the DOT file format can lay it out a little better. It turns out that OmniGraffle does an excellent job of laying out the graph. I should have guessed. Output PDF file: UTType.pdf OmniGraffle Document: UTType.graffle OmniGraffle 4.0 will have SVG export functionality. I’m sure I’m not the only one waiting for that. But is it my imagination or is Omni hiking the price through the roof? Added python source code: >
#!/usr/local/bin/python
import plistlib
thePath = '/System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist'
thePlist = plistlib.readPlist(thePath)
theDocumentTypes = thePlist['UTExportedTypeDeclarations']
theNames = {}
theIndex =
for theDocumentType in theDocumentTypes:
theNames[theDocumentType['UTTypeIdentifier']] = 'UT%d' % theIndex
theIndex += 1
print 'digraph G {'
for theDocumentType in theDocumentTypes:
theType = theDocumentType['UTTypeIdentifier']
theName = theNames[theType]
print '\t%s [label="%s"];' % (theName, theType)
if theDocumentType.has_key('UTTypeConformsTo'):
if type(theDocumentType['UTTypeConformsTo']) == type(''):
theDocumentType['UTTypeConformsTo'] = [theDocumentType['UTTypeConformsTo']]
for theConformTo in theDocumentType['UTTypeConformsTo']:
theConformToName = theNames[theConformTo]
print '\t%s -> %s;' % (theName, theConformToName)
print '}'