Script to export DT3 annotations to Scrivener?

I’ve been trying to recreate my perfect workflow ever since Sente went bust several years ago. Sente had a script where you could export your annotations to Scrivener as an .opml file (I believe?) that saved as nesting index cards (See screenshot below).

Is there any way to currently do something like this from DT3? I’ve been switching back and forth between annotating PDFs directly in DT3 and using the Highlights app in markdown. I know Bookends has a similar kind of script, but I find it to be extremely buggy, and I really don’t like the Bookends in-app annotation features.

You can use Tools > Summarize Highlights to create a document with the current highlights.

There is a FIle > Export > as OPML command, but it appears Scrivener interprets it in such a way the text is used as the title. :thinking:

Maybe. From your description, it is not very clear if you’re annotating PDF files or something else. In the first case, it seems not to be possible to get at the annotations from DT programmatically. A search in the forum (always useful) reveals this

For Markdown or other text files, however, this should be scriptable. But beforehand, it should be clear what OPML content Scrivener is expecting. It seems that OPML is fairly vague as a markup dialect.

FWIW, I’m on a tangential path. I’m preferring to export to markdown (heading to Obsidian). The best path is from Highlights either into Devonthink as a markdown textbundle or (as I’ve just discovered) directly out of Highlights as a textbundle folder (not as a markdown file).

My ongoing explorations are documented here. My developments with Devonthink have also resulted in an AppleScript recently posted in this thread.

As an aside, I find the annotation tools in Bookends iPadOS to be as good as or better than those in Highlights iPadOS but the exact inverse is true for the macOS versions of these apps.


JJW

Yes, just tried this and no luck. Maybe if I was summarizing highlights as an .rtf instead? But then I’d lose all my formatting.

?
What formatting? There is no formatting in highlighting.

I mean the formatting that I add using markdown to my summarize highlights file. Like this: