|||

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:

  • Check if the file has data in the “bookendsID” custom meta data field
    • If not, it will prompt you to select the appropriate reference in Bookends (if desired)
    • Then, it will place the DEVONthink item UUID in the user20 metadata field of Bookends, and place the Bookends reference ID in the “bookendsID” custom meta data field of the record in DEVONthink
  • It will then run DEVONthink’s Summarize Highlights feature on the PDF
  • If annotations are found, it grabs the summarized annotations and places them in the PDF’s annotations file
    • If not, it just creates a blank annotations file
  • If possible, it then appends a link to the Bookends reference at the bottom of the file
  • Last, it moves the annotation file to a specific folder so that I can view and open it in Obsidian.

Requirements:

  • DEVONthink 3 Pro
  • Bookends
  • Some way of running the script

Set up:

  • Customize the UUID fields in it to refer to your databases/destination groups
  • In DEVONthink 3 Pro, create a custom meta data field in Preferences → Data with the key bookendsID
  • In Bookends, make sure you’re not using the user20 field for anything else

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!↩︎

    Next → DEVONsave v3: A shortcut to help you clip articles to clean PDFs in DEVONthink To Go 3 (and DEVONthink 3) ← Previous → Cross-post: Intuition is confident abductive-inferential thinking Intuition is really just confident, logical thinking
    Latest posts
    → Italian Edition of The Rise of Integrated Thinking Environments
    Stream annotations from your PDF reading sessions with DEVONthink
    → There is only one next action for any project
    A systems model of anxiety-driven procrastination
    Personal automation for augmenting intelligence: A shortcut to stay on task
    An Obsidian Homescreen for iPhone and iPad
    Obsidian, Roam, and the rise of Integrated Thinking Environments—what they are, what they do, and what’s next
    An Integrated Qualitative Analysis Environment with Obsidian
    Your Notes are an Information System: Lessons from Information Systems for Personal Knowledge Management
    DEVONlink - Integrate Obsidian and DEVONthink
    DEVONsave v3: A shortcut to help you clip articles to clean PDFs in DEVONthink To Go 3 (and DEVONthink 3)
    Connect DEVONthink PDFs, Bookends references, and Obsidian summary notes with this script
    → Cross-post: Intuition is confident abductive-inferential thinking
    → Note titles as API calls
    Why and how to use Obsidian and NotePlan together
    The best of both worlds: One-click reference metadata for Bookends with Zotero
    Distraction Deterrent
    Today’s Plan: A shortcut for planning your day with a text-based list and Fantastical
    DEVONsave: A shortcut to help you clip websites to DEVONthink To Go quickly and cleanly
    Fulcra → A turn of events
    Systemics and design principles in support of Tiago Forte’s PARA framework