Attached are four EF applescripts (tested with OS 10.6) to help the Skim-EF-Dropbox workflow and, more generally, to help make consistent the various formats in which one might have saved Skim pdf files -- pdfd bundles, pdf wth embedded notes, pdf with notes in extended attributes (i.e., using a normal Skim save).
The first three help extend the workflow to iOS (or other) apps that read pdf files but not pdfd bundles.
A suggested workflow would be to
- Run the first two scripts on all library records to convert all pdfd bundles and pdf files with embedded notes to regular Skim pdf files.
- Select all pdfs and append an "unread" tag; and
- Run the third script on all records to embed the notes and remove the "unread" tag from annotated pdfs and only those pdfs. This way only those those pdfs that were annotated would be considered "read". (Note: If there is a Skim .notes file for a pdf that only has embedded notes, that will bring up a dialog.)
Thereafter, when annotating a pdf in Skim, make sure to embed the changes using the third script (or Skim:File:Export:PDF With Embedded Notes to the original location). Similarly, when annotating the pdf using iOS (or other) tools, make sure to embed the changes.
The key caveat in using the third script is that some Skim annotations may be modified or lost when embedded in the PDF -- see all mentions of "embed" on http://sourceforge.net/apps/mediawik....php?title=FAQ. In particular, an anchored note appears only as an image, and the text is lost. You should test such issues by round-tripping your annotated pdfs. To do so, 1) embed the notes, 2) close the file, 3) reopen, and 4) File:Convert Notes. Identify all changes (color, borders, editability, etc.) on all your annotation types (highlight, text note, etc.). If the results are satisfactory, open and annotate the pdf in your iOS (or other) app, save, and reopen in Skim and see how the new annotations appear.
The fourth script converts only those pdf files that have annotations in extended attributes to pdfd bundles. So, if one wants to use pdfd bundles only for those files that have annotations, one can run the first and fourth scripts.
Credits: All four scripts were derived from http://c-command.com/scripts/eaglefiler/pdf-to-pdfd. The "do shell" test in pdf_w_annotations-to-pdf_ and pdf_w_annotations-to-pdfd is based on bash code from Christiaan Hofman, and adapted to Applescript with help from Alan Smith.
[see follow-on posts for updated scripts]