Export PDF Highlights and Annotations to Obsidian?

Is there a way to export PDF highlights and annotations to Obsidian?

I’m looking for something like the Readwise integration with Obsidian: How does the Readwise to Obsidian export integration work? - Readwise

FWIW I just scanned their code: obsidian-readwise/main.ts at master · readwiseio/obsidian-readwise · GitHub - its GPL’d so you could use as a base for a DT version of the same idea.

Did you try Tools > Summarize Highlights > As Markdown?

It’s a start. By comparison Readwise exports metadata that appears missing in the DT world: Author, Tags, Rating, …

Also the Readwise plugin is a true sync in terms of appending new content at the end, rather than a onetime export.

Finally once enabled it syncs in the background.

…any thoughts on how I extend the functionality? Some of it needs to happen inside DT. Like adding the metadata to the markdown file.

Other parts could happen either with an Obsidian plugin that simply watches a DT folder for the appearance of a Markdown file and then copies it over.

Like adding the metadata to the markdown file.

What metadata and to where?

Example with this document:

I have the following Metadata: Tags (Team Models), Authors, Origin URL etc.

Why not embed that all at the top of the Markdown document and allow the end user to configure the format. In my case I would turn into the YAML Style used by Obsidian.

Are you referring to doing something like…

Tags: testing
Authors: Me, You
Origin URL: https://www.somesite.com

You know you already can add YAML metadata at the top of the document manually.
You are referring to something custom to your situation, not the standard behavior of Markdown editing in general.

It could be YAML, or not. My goal is to fully automate highlight export.

I want three things:

  • Any automated way to embed author(s), tag(s), origin url etc into a markdown file
  • Turn those into variables and give me a template file I can edit (as you do for many other things)
  • Extreme bonus round, make the highlights update

You could also work with the readwise people to plugin into to their ecosystem, but then they have control over things that you might want to control.

…Do I take it that my desires are completely in the land of roll your own automation?

How much of this can I achieve with DT SmartRules?
When that fails is Keyboard Maestro the next place to go?

Yes, this would be a custom setup.

Note: What do you mean by *“updating highlights”_ ? Do you mean appending to a document or updating existing highlights? The former is possible. The latter, is possible but would not be trivial.

When that fails is Keyboard Maestro the next place to go?

That depends on the person. I don’t use KM for anything but the rare support question.

For those that come looking for this, there are bits and pieces you might start from here: Automatically capture and annotate items (to use with Obsidian) - #4 by mlevison

I might take a stab at that: Syncing highlights/annotations between PDF and markdown

@mlevison Here’s my take on the bonus round Stream annotations from your PDF reading sessions with DEVONthink - #55 by mdbraber