I was hoping someone might be able to help me modify rob trew’s skim to devonthink script that I’ve been using. (link here: github.com/RobTrew/tree-tools/b … pplescript).
I didn’t really have any working knowledge of applescripts, so I’ve been looking things up piece by piece in trying to make the modifications i need. I’ve successfully changed a few small things (e.g. the format of the folder name outputted in DT), but I’m finding myself completely stuck on the following.
- The script basically imports each skim annotation as a separate note in DT, with each note linked to the relevant page on the pdf. On Skim, I primarily highlight text, and this script is great for importing the highlights as notes. If you run the script on a pdf again after adding more annotations, it will discard duplicate annotations and only add new annotations. I’d like to keep this functionality but with a slight modification.
The basic template of the added RTFs are “Quotation… Comment… Source…” so the quotation is the highlighted text, Comment is blank and under Source there’s the link to the pdf page. What I’d like to be able to do is add text (my own notes) under comment, and even add additional links under Source if other documents are relevant. As the script is currently written, if I modify an imported note in any way in DT, the next time I run the script on the pdf, it will duplicate the annotations in DT, since the edited annotation is technically no longer a match with the original highlight in the pdf. So I was wondering if there’d be any simple way of having the script only compare the “quotation” sections when determining whether there’s already a match in DT. So for the purposes of a script identical quotations would be treated as duplicates (and hence not added) even if I’ve modified the sections below the quotation in the full note. Any ideas?
- Second, currently the script creates a subfolder in whichever DT folder I select and adds the notes and (in my case) the indexed pdf to that folder. this functionality fits quite nicely with my workflow as well. The only modification I’d like to make is that instead of adding a duplicate of the pdf to the sub folder, it adds a replicant.
Any tips would be greatly appreciated!