It’s a private format. However as for the part you have done, it’s better not to do this yourself. There is a command line tool (skimnotes) embedded in Skim to extract the notes data from the file, so you don’t have to deal with the particulars of the extended attributes and assembly of the parts. This is also explained on the Wiki, and there are also some sample scripts using it.
As for the format, it is really archived Obj-C objects. It may look like a plist, but its format is private, and in this case not documented (it’s made by Apple’s frameworks, and they don’t even tell us it’s a plist). To read it you need to use the NSKeyedUnarchiver obj-C class. As the Wiki page says. This should also be possible from python, though I don’t know much about PyObjC. Christiaan > On Oct 5, 2015, at 8:15, David Becher <becher.da...@googlemail.com> wrote: > > Actually, I already figured out how to get to the xargs. By having a look at > the source code I saw that you compressed and splitted the data across > different arg values. I was able to join and uncompress them, resulting in a > plist file (and this with not very much knowledge of Obj-C, I am kind of > proud). Now my question: can maybe someone elaborate on the plist-structure > for skim-notes? I want to parse the plist, however all I found was this: > > http://sourceforge.net/p/skim-app/wiki/Skim_Notes_Keys/ > > and I don't really understand the structure of that table (is that even a > table, it seems wrongly formatted for a table). > > All the best, > David > > >> On 05 Oct 2015, at 05:10, David Becher <becher.da...@googlemail.com> wrote: >> >> Ah, thanks for that. There See even dedicated Python libraries for xargs >> read access :) >> >> Last question: which format did you save the notes in? Just so I know how to >> properly parse :) Is it one of the Obj-C data-types like NSArray? >> >> >> >> On Oct 5, 2015, at 12:03 AM, Christiaan Hofman <cmhof...@gmail.com> wrote: >> >>> >>>> On Oct 4, 2015, at 23:59, David Becher <becher.da...@googlemail.com> wrote: >>>> >>>> Hello there, >>>> >>>> I am right now typing up a python script which - hopefully - can extract >>>> the notes of a given PDF file annotated with Skim. I don't want to use >>>> AppleScript, on the one hand it is actually possible with AppleScript to >>>> export the notes to text, however it does not provide enough information >>>> (color of highlight e.g.). >>>> >>>> However, i can't seem to find the physical location in which Skim writes >>>> these notes. It is not the PDF file itself, since its md5sum does not >>>> change. I tried narrowing it down by using `lsof -p <Skim-PID>`, however >>>> ultimately I could not find the file in which it is being stored. >>>> >>>> Can maybe someone help me out? I would have a look at the source code, >>>> however I don't know a thing about Objective-C at all. >>>> >>>> All the best, >>>> David >>> >>> It’s in the extended attributes of the file. That’s also mentioned on the >>> Wiki. >>> >>> Christiaan
------------------------------------------------------------------------------
_______________________________________________ Skim-app-users mailing list Skim-app-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-users