cocoa - Formatted text encoding in binary plist -
i'm trying scripting edits binary plist file. plist describes objects contained in dvd studio pro file. appears text box in dvd studio pro encoded in plist base64 data describes text string along formatting. can't seem figure out how understand data. ideally, i'd able alter text string not formatting. following seems describe text box says "menu title here". there 2 strings, 1 key called "dictionary" , other called "string"; both cfdata. ideas how can parse or convert format can edit directly? i've been playing around writing little converter in cocoa, no luck yet.
<dict> <key>dictionary</key> <data> batzdhjlyw10 exblzihoa4qb qisehaxou0rp y3rpb25hcnka hiqitlnpympl y3qahyqbaqas hisece5tu3ry aw5nazseassg tlngb250hpke hiqgtlngb250 hpsvjiqfwzm2 y10gaaaaggaa ap/+tab1agma aqbkagearwby ageabgbkagua aaceawyvhafj ajsbmwcbaias hjaxb05tq29s b3kgkosehado u0nvbg9yajsb ayqezmzmzopz 8ni/g/dvbz+d 7otrpwggkosw lwtou0v4cgfu c2lvboashise ce5ttnvtymvy aiseb05tvmfs dwualiqbkosa monhx9c9hpke lpcntlnpymxp cxvlbmvzc4as hj6ghiqbzkea hpkelpcqtlnq yxjhz3jhcght dhlszyashise ee5tugfyywdy yxbou3r5bgua liqeq0nauwaa hqcgkoswlxfo u0jhy2tncm91 bmrdb2xvcoas hjuba4qczmya aiag </data> <key>string</key> <data> batzdhjlyw10 exblzihoa4qb qisehbjou0f0 dhjpynv0zwrt dhjpbmcahiqi tlnpymply3qa hzkehiqitlnt dhjpbmcbliqb kw9ozw51ifrp dgxliehlcmwg hajpsqepkose haxou0rpy3rp b25hcnkaliqb aqwshjawdu5t t2jsaxf1zw5l c3ogkosehaho u051bwjlcgce hadou1zhbhvl ajseasqehafk nqcgkoswlgto u0v4cgfuc2lv boashjuchiqb zp6dr8fxpyas hjawee5tugfy ywdyyxbou3r5 bgwgkosehbbo u1bhcmfncmfw afn0ewxlajse bendqfmaaiua hpkelpygtlng b250hpkehiqg tlngb250hpsz jiqfwzm2y10g aaaaggaaap/+ tab1agmaaqbk agearwbyagea bgbkaguaaace fyqbywcjaama owcgkoswlgdo u0nvbg9yhpke hiqhtlndb2xv cgcuowgebgzm zmad8/jyp4pw 728/g+zraz8b hoag </data> </dict>
that's base64-coded nsarchiver archive. need decode base64 first, use [nsunarchiver unarchiveobjectwithdata:]
. "dictionary" entry above looks after decoding (in python syntax because used pyobjc):
{ nsbackgroundcolor = "nscalibratedwhitecolorspace 0 0"; nscolor = "nscalibratedrgbcolorspace 0.94902 0.937255 0.921569 1"; nsexpansion = "0.1053606"; nsfont = "\"lucidagrande 21.00 pt. p [] (0x103110b60) fobj=0x103110c30, spc=6.64\""; nsobliqueness = 0; nsparagraphstyle = "alignment 0, linespacing 0, paragraphspacing 0, paragraphspacingbefore 0, headindent 0, tailindent 0, firstlineheadindent 0, lineheight 0/0, lineheightmultiple 0, linebreakmode 0, tabs (\n 28l,\n 56l,\n 84l,\n 112l,\n 140l,\n 168l,\n 196l,\n 224l,\n 252l,\n 280l,\n 308l,\n 336l\n), defaulttabinterval 0, blocks (null), lists (null), basewritingdirection -1, hyphenationfactor 0, tighteningfactor 0.05, headerlevel 0"; }
Comments
Post a Comment