|||

Stream annotations from your PDF reading sessions with DEVONthink

One thing that makes PDF annotations extremely valuable is that they can be extracted.

A variety of apps and services have popped up to support this: PDF Viewer, Highlights, PDF Expert, and DEVONthink all let you review and even export PDF annotations into text you can manipulate with, say, your favourite Integrated Thinking Environment.

PDF Viewer’s Annotation sidebarPDF Viewer’s Annotation sidebar

In recent years, however, we’ve seen some tantalizing new services that offer to do more with your annotations. Readwise, Memex, and Remnote offer ways of taking annotations out of our readings and putting them directly into our notes—automatically! What a world we live in.

I wanted a way to do this with the tools I already have. I also wanted it to be extremely customizable. So, I have crafted a workflow to “stream” the annotations from my PDF reading sessions using DEVONthink and AppleScript.

Here’s what it looks like:

An example annotated PDF on the left, and some samples of extracted reading sessions from that PDF on the right, viewed in Obsidian.An example annotated PDF on the left, and some samples of extracted reading sessions from that PDF on the right, viewed in Obsidian.

Here’s what it does in practice:

  1. You open a PDF in DEVONthink on your favourite device. (Feel free to open it in your favourite PDF reading app.)
  2. You annotate the PDF as you read.
  3. Fifteen minutes1 after you last modify the file (e.g., after you add an annotation), DEVONthink creates a “Reading Session” note with the new annotations in whatever folder you want.

That’s it! Of course, it’s still up to you to do something with those annotations.

Here’s how it works:

  • A DEVONthink Smart Rule watches for PDFs with annotations that were recently modified. If it finds any, it tries to execute the script.
  • By using DEVONthink’s custom metadata, the script double-checks that (1) the file’s content has actually changed and (2) the number of annotations has increased.
  • It then uses DEVONthink’s Summarize Highlights feature to export the PDF’s annotations, and then extracts only the newly-added annotations from that file into a Reading Session note.

Setting up the automation

Requirements

  • DEVONthink 3 Pro. The script uses custom metadata, which is only available in the Pro edition.

Instructions

  1. Download the “Automatically extract reading session annotations” script.
  2. Open the script file and configure it according to the instructions at the top of the file.
  3. In DEVONthink, open the Script menu (just to the left of Help in the menubar), and select “Open Script Folder.” Place your newly-downloaded script in the Smart Rules folder.
  4. Quit and relaunch DEVONthink. This will ensure DT3 “recognizes” the newly added script.
  5. Download the “Extract reading session annotations” Smart Rule. When you open this file, it should add a new Smart Rule to your DT3 Smart Rules that looks like this:

The configuration for the “Extract reading session annotations” Smart RuleThe configuration for the “Extract reading session annotations” Smart Rule

  1. Configure the Smart Rule to your preferences, as desired. (E.g., you may not want this rule to work on all PDFs in all databases, in which case you should tell it to only look for PDFs in a particular database or group.)
  2. Make sure the Smart Rule’s action is “Execute Script -> External -> _Automatically-extract-reading-session-annotations”. (You may have to select this manually.)
  3. Start annotating PDFs and, fifteen minutes2 after you’ve added some annotations, you should see a new Reading Session note get created!

I may have missed some instruction(s). Feel free to reach out if you have questions. (I will do my best to provide support, although it can be extremely tough to debug scripts sometimes.)

Some assumptions:

  • DEVONthink 3 Pro has to be running on a Mac in order for the script to trigger.
  • Annotations are added sequentially. The script will not work if you go back and add annotations earlier in a PDF. E.g., it won’t automatically extract annotations added on page 1 after you’ve already highlighted something on page 2.

  1. The delay can be configured by editing the properties at the top of the script.↩︎

  2. The delay can be configured by editing the properties at the top of the script.↩︎

    ← Previous → There is only one next action for any project Don't overplan. For any given project, you only need to know one thing: what the very next action is.
    Latest posts
    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