-
Notifications
You must be signed in to change notification settings - Fork 4
Reading OmniGraffle files
sk2 edited this page Sep 21, 2011
·
2 revisions
import plistlib
pl = plistlib.readPlist("test.graffle")
del pl['QuickLookPreview']
del pl['QuickLookThumbnail']
pl
Out[22]:
{'ActiveLayerIndex': 0,
'ApplicationVersion': ['com.omnigroup.OmniGraffle', '138.23.0.152539'],
'AutoAdjust': True,
'BackgroundGraphic': {'Bounds': '{{0, 0}, {559, 783}}',
'Class': 'SolidGraphic',
'ID': 2,
'Style': {'shadow': {'Draws': 'NO'}, 'stroke': {'Draws': 'NO'}}},
'CanvasOrigin': '{0, 0}',
'ColumnAlign': 1,
'ColumnSpacing': 36.0,
'CreationDate': '2011-09-21 07:02:56 +0000',
'Creator': 'Simon Knight',
'DisplayScale': '1 0/72 in = 1 0/72 in',
'GraphDocumentVersion': 6,
'GraphicsList': [{'Class': 'LineGraphic',
'Head': {'ID': 4},
'ID': 9,
'Points': ['{203.31407, 308.24347}', '{161.68594, 231.2565}'],
'Style': {'stroke': {'HeadArrow': 'FilledArrow',
'LineType': 1,
'TailArrow': '0'}},
'Tail': {'ID': 6}},
{'Class': 'LineGraphic',
'Head': {'ID': 6},
'ID': 8,
'Points': ['{346.59995, 234.63632}', '{254.40009, 318.76208}'],
'Style': {'stroke': {'HeadArrow': 'FilledArrow',
'LineType': 1,
'TailArrow': '0'}},
'Tail': {'ID': 5}},
{'Class': 'LineGraphic',
'Head': {'ID': 5},
'ID': 7,
'Points': ['{179.35272, 195.25865}', '{338.64728, 204.63979}'],
'Style': {'stroke': {'HeadArrow': 'FilledArrow',
'LineType': 1,
'TailArrow': '0'}},
'Tail': {'ID': 4}},
{'Bounds': '{{186, 301.5}, {76, 90}}',
'Class': 'ShapedGraphic',
'FitText': 'Clip',
'Flow': 'Clip',
'FontInfo': {'Font': 'ArialMT', 'Size': 9.0},
'GridCenter': 'YES',
'ID': 6,
'Shape': 'Circle',
'Style': {'shadow': {'Draws': 'NO'},
'stroke': {'Width': 0.800000011920929}},
'Text': {'Pad': 0,
'Text': '{\\rtf1\\ansi\\ansicpg1252\\cocoartf1138\n{\\fonttbl\\f0\\fswiss\\fcharset0 ArialMT;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\pardirnatural\\qc\n\n\\f0\\fs18 \\cf0 ccccc}'},
'Wrap': 'NO'},
{'Bounds': '{{339, 161.89844}, {76, 90}}',
'Class': 'ShapedGraphic',
'FitText': 'Clip',
'Flow': 'Clip',
'FontInfo': {'Font': 'ArialMT', 'Size': 9.0},
'GridCenter': 'YES',
'ID': 5,
'Shape': 'Circle',
'Style': {'shadow': {'Draws': 'NO'},
'stroke': {'Width': 0.800000011920929}},
'Text': {'Pad': 0,
'Text': '{\\rtf1\\ansi\\ansicpg1252\\cocoartf1138\n{\\fonttbl\\f0\\fswiss\\fcharset0 ArialMT;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\pardirnatural\\qc\n\n\\f0\\fs18 \\cf0 bbbbb}'},
'Wrap': 'NO'},
{'Bounds': '{{103, 148}, {76, 90}}',
'Class': 'ShapedGraphic',
'FitText': 'Clip',
'Flow': 'Clip',
'FontInfo': {'Font': 'ArialMT', 'Size': 9.0},
'GridCenter': 'YES',
'ID': 4,
'Shape': 'Circle',
'Style': {'shadow': {'Draws': 'NO'},
'stroke': {'Width': 0.800000011920929}},
'Text': {'Pad': 0,
'Text': '{\\rtf1\\ansi\\ansicpg1252\\cocoartf1138\n{\\fonttbl\\f0\\fswiss\\fcharset0 ArialMT;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\pardirnatural\\qc\n\n\\f0\\fs18 \\cf0 aaaa}'},
'Wrap': 'NO'}],
'GridInfo': {},
'GuidesLocked': 'NO',
'GuidesVisible': 'YES',
'HPages': 1,
'ImageCounter': 1,
'KeepToScale': False,
'Layers': [{'Lock': 'NO', 'Name': 'Layer 1', 'Print': 'YES', 'View': 'YES'}],
'LayoutInfo': {'Animate': 'NO',
'circoMinDist': 18.0,
'circoSeparation': 0.0,
'layoutEngine': 'dot',
'neatoSeparation': 0.0,
'twopiSeparation': 0.0},
'LinksVisible': 'NO',
'MagnetsVisible': 'NO',
'MasterSheets': [],
'ModificationDate': '2011-09-21 07:04:39 +0000',
'Modifier': 'Simon Knight',
'NotesVisible': 'NO',
'Orientation': 2,
'OriginVisible': 'NO',
'PageBreaks': 'YES',
'PrintInfo': {'NSBottomMargin': ['float', '41'],
'NSHorizonalPagination': ['int', '0'],
'NSLeftMargin': ['float', '18'],
'NSPaperSize': ['coded',
'BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAx7X05TU2l6ZT1mZn2WgVMCgUoDhg=='],
'NSPrintReverseOrientation': ['int', '0'],
'NSRightMargin': ['float', '18'],
'NSTopMargin': ['float', '18']},
'PrintOnePage': False,
'ReadOnly': 'NO',
'RowAlign': 1,
'RowSpacing': 36.0,
'SheetTitle': 'Canvas 1',
'SmartAlignmentGuidesActive': 'YES',
'SmartDistanceGuidesActive': 'YES',
'UniqueID': 1,
'UseEntirePage': False,
'VPages': 1,
'WindowInfo': {'CurrentSheet': 0,
'ExpandedCanvases': [{'name': 'Canvas 1'}],
'Frame': '{{0, 4}, {840, 1024}}',
'ListView': True,
'OutlineWidth': 142,
'RightSidebar': False,
'ShowRuler': True,
'Sidebar': True,
'SidebarWidth': 120,
'VisibleRegion': '{{-73, -43}, {705, 869}}',
'Zoom': 1.0,
'ZoomValues': [['Canvas 1', 1.0, 1.0]]},
'saveQuickLookFiles': 'YES'}