Exporting your PDF Annotations from Skim

I’ve got to write this down now, while I still remember what I did. Dan Sheffler has a great blog. Lots of really neat & useful stuff. One of the things he has is a script for exporting your notes and annotations of pdfs in nicely formatted markdown. (All OS, I’m afraid Windows folks). First two things we need: Skim: http://skim-app.sourceforge.net/ Bibdesk: http://bibdesk.sourceforge.net/ And a pdf of some academic article. Download and install Bibdesk. Open Bibdesk. Drag & drop your pdf onto the Bibdesk window. Add relevant metadata. Crucial: the ‘Cite key’ field is like a shortcode for referencing all this. Screen Shot 2015-06-28 at 9.56.16 PM In the screenshot above, I’ve got Alice Watterson’s recent piece from Open Archaeology. My cite key is her name & the year. Now, in Skim, open that pdf up, and start making notes all over it. Save. Now, the first thing we’re going to do is use Sheffler’s script for making custom URLs that will link our notes to the relevant page of the pdf; these are URLs that we can then use in our Markdown documents. His instructions are at: http://www.dansheffler.com/blog/2014-07-02-custom-skim-urls/ To follow those instructions, find your AppleScript editor on your machine, and paste his code in. Save as an application. Then, find the application (he called his ‘Skimmer’) on your machine, and right click (or whatever you do to bring up the contextual menu) and inspect package contents. You then open the info.plist file in a text editor, and swap the default for what Sheffler instructs – see my screenshot:Screen Shot 2015-06-28 at 10.00.24 PM Run the Skimmer application. If all goes well, nothing much should appear to happen. Ok, so, let’s test this out. I went to dillinger.io and made the following md link: [@Watterson2015 [page 120](sk://Watterson2015#120)] and then exported it as html. I opened the html in my browser, and hey presto! When I clicked on the link, it opened the pdf in Skim at my note!

So that’s part 1 achieved. Now onwards to part 2.

Next, we want to export our Skim annotations as nicely formatted markdown (you could then use them in a blog post, or on github, or wherever). http://www.dansheffler.com/blog/2014-07-07-exporting-skim-notes/ Again, open up your applescript editor, and paste Sheffler’s code. This code requires that you have those custom URLs set up, BibDesk installed, and something called pdftk (I checked it out; seems to be a windows program, so I ignored it. Script ran well anyway, so *shrug*) [1]. Finally, the end of the script opens up Marked for viewing and editing the md. I don’t have that, so I simply changed that final line from Marked to Atom (which I do have) – and that works. If you right-click on your finder, select ‘go to folder’ and type in Library, you can find the ‘Application\Support’ folder. I made a new subfolder called ‘Skim\scripts’ and saved the script in there as skim-export. Fired Skim back up, opened Watterson 2015 in Skim, selected ‘skim-export’ and behold: Screen Shot 2015-06-28 at 10.11.59 PMA nicely formatted markdown document with my annotations – and crucially, the links back to the original pages. I can now save this markdown into a github repo, or any number of markdown flavoured wiki type things that run locally on this machine, or use pandoc to convert it to something else, or… Markdown is *wonderful*. These scripts are too! Thank you Dan. Next thing I want to try: http://www.dansheffler.com/blog/2015-05-11-my-zettelkasten-in-sublime/

[1] Dan responds at http://dansheffler.com/blog/2015-07-01-electric-archaeology/ to note that the tool in question is here: https://www.pdflabs.com/tools/pdftk-server/ and runs on the command line.

%d bloggers like this:
close-alt close collapse comment ellipsis expand gallery heart lock menu next pinned previous reply search share star