How to put DevonThink links in Skim notes

For every book or paper that I read I create a new page in my wiki. The name of this page is created under the following template: Title – Author, for example “Deconstructing the Laws of Logic – Clark”. In this page I keep all my notes and my thoughts concerning this paper. The pdf file is inside a DevonThink database. When I am reading a pdf I want to be able to use the DevonThink link without leaving Skim. To this end I wrote an AppleScript, which creates in the first page of the pdf four Skim notes, containing four different ways of constructing references using DevonThink links.

The fourth note is the simplest and contains the DevonThink url (x-devonthink-item://CDEC17B7-1EEE-42E1-B8C9-86A24C172BF3?page=0). Its extended text contains the title of the wiki page.

The third note contains a MediaWIki internal link to the wiki page of this pdf followed by an external link to the pdf file itself.

The second note contains the necessary Latex code for creating a proper bibliography reference and a link to the exact pdf page using the hyperref package. The only things that are missing from the above code are the cite key (between the opening parenthesis and the colon) and the page numbers. As an example the complete second note is the following:

(\cite{Deconstructing-the-Laws-of-Logic-Clark-2008a}: \href{x-devonthink-item://CDEC17B7-1EEE-42E1-B8C9-86A24C172BF3?page=}{})

As you can notice the cite key “Deconstructing-the-Laws-of-Logic-Clark-2008a” is quite long. I have chosen this because I want to recognize the reference just by looking in its cite key and not by trying to remember for example which paper Clark wrote on 2008…

The code for a bibliography reference to the third page of this paper which is in the 27th page of the Philosophy Journal is the following:

(\cite{Deconstructing-the-Laws-of-Logic-Clark-2008a}: \href{x-devonthink-item://CDEC17B7-1EEE-42E1-B8C9-86A24C172BF3?page=2}{27})

The first note contains the necessary MediaWiki code for creating a link to the excact pdf page which is compatible with LaTeX whenever you want to export the wiki text to Latex (more about this in a quite distant in time post…).

Now every time I want to create a link to a pdf file everything is at hand in one of these notes!

The AppleScript code which makes all the above possible is the following:

2011-04-02
In my post “How to create correctly the Skim notes which have the DEVONthink links, when you have already annotated the first page of the PDF document” there is an improved version of the above AppleScript. The newer one solves a problem which appears when you want a third AppleScript to use the aforementioned Skim notes like the AppleScript in my post “Automated creation of a LaTeX compatible citation only from Skim! (with hyperlink included)“. Moreover it creates a fifth note for which there is detailed information in my post “Latin page numbers, Arabic page numbers and the fifth Skim note“.

5 Responses to “How to put DevonThink links in Skim notes”

  1. Anonymous says:

    Does this export script essentially need TextMate as editor for some specific feature (If yes, why?), or would it be possible with other editor as well, e. g. TextEdit or freeware text editors?

    Kind regards

    Martin

  2. Anonymous says:

    p.s. sorry, my question was referring to the other script for automatic summary creation (http://organognosi.blogspot.com/2011/02/automated-summary-creation-linked-with.html)

    Martin

  3. Euboulides says:

    No, you can use any text editor as long as it supports AppleScript and has a command that can substitute the use of "insert" command in my AppleScript.

  4. catherine says:

    a similar question: would using a different wiki be likely to raise problems? I have a similar workflow idea that’s a lot less fancy and only half implemented that I’m considering beefing up using some of your tricks (which are great!). It involves a PMWiki for storing and organizing notes, since that seemed to be the simplest possible wiki option, and none of the social aspects of wikis are necessary. My goal is to eventually make the wiki use latex style markup for formatting so that notes can be copied directly into latex documents. The other implemented bit is a little template to make Skim export notes formatted as latex-style quotes with \cite tags for highlighted text, and just plain text for my notes (haven’t dealt with other note types yet). I don’t have the two parts integrated yet (notes automatically being posted to the wiki when the pdf is saved is the plan), nor your fix to the page number issue, nor automatically generated citekeys, etc., etc.
    Another thing I’m wondering about is whether DEVONthink is essential to this aspect of the workflow. I’m fairly content using BibDesk for organizing my files (after ditching Mendelay in frustration), and not keen on spending the extra time or money to add another program to the mix. I guess it might be handy for creating internal links in the wiki (just a guess), and links to the pdf pages cited, but I’d settle for just getting the notes stored in the wiki with bibtex citations.
    Thanks!

    • Thanks for your comments Catherine.

      I do not know a lot of things about PMWiki so I cannot make any substantive comments about its advantages and disadvantages. Generally speaking, I think the most important thing is to use a wiki. The specific wiki software which you will use is a somewhat secondary matter. DEVONthink is required only if you want to create easily links to specific PDF pages or to other files.

Leave a Reply