Connecting and automating DEVONthink, Bookends, and Obsidian

Published Jan 27, 2021

# Connect DEVONthink PDFs, Bookends references, and Obsidian summary notes with this script

Feb 9, 2021: I’ve updated the script to catch a few issues and to clean up the output (by removing critic markup using a find-and-replace method).

DEVONthink is where I keep all of my, well, everything. DEVONthink’s item links use a universal unique identifier1 (UUID) to allow robust deep-linking to every kind of file you can throw at it.

I tend to go a bit overboard on highlighting sometimes. (This is from van der Heijden’s “Scenarios, Strategy, and the Strategy Process”, 1997.)

(It might be more useful to extract what I haven’t highlighted, sometimes.)

DEVONthink is also a great way of engaging with the data you capture about these files. For example, its “Summarize Highlights” feature will extract annotations—such as your highlights—from a selected PDF into markdown, RTF, or PDF format. DEVONthink also has a built-in annotation feature. This creates a note file specific to whatever file you’re currently viewing so that you can annotate it yourself.

However, by default, these two features are separate. I wanted to extract a PDF’s annotations in markdown (e.g., everything I’ve highlighted or commented on) and add those thoughts automatically to the DEVONthink annotation file for the PDF.

I also wanted to link these files together with Bookends. Bookends is a Mac/iOS reference manager of choice (once you’ve got your references imported). It is extremely performant, even with thousands of references, it has a variety of powerful features, and it has excellent macOS integrations (e.g., it is highly scriptable).

Last, I wanted to be able to open and work with these annotation files in Obsidian.

So, I created a script that does all of the above!

Select a PDF in DEVONthink, then run the script. It will:

# Requirements:

# Set up:

Download the “Link Bookends and DEVONthink items and summarize highlights for an annotation note” script

I also include two helper scripts that use the custom metadata in DEVONthink and Bookends to open the relevant item in the alternative app

# Open a Bookends reference from a DEVONthink item with a bookendsID

Download the “Open Bookends reference from DEVONthink” script

# Open a DEVONthink record from a Bookends reference with a DEVONthink UUID

Download the “Open DEVONthink record from Bookends” script

  1. Or unique universal identifier? Choose whichever order you prefer, I guess! ↩︎