Hmmm… Scrivener… I seem to remember it has a corkboard view in which each document’s synopsis appears…
Ok, a few minutes fiddling later. Now I can go to a document with an annotation and hit a hot key, then go to a markdown file and hit another hot key to transclude the annotation.
Scrivener corkboard/synopsis mode, more or less.
Here’s what I did.
Make an annotation template that has this for the first line:
[%recordName%](%recordLink%%digitalObjectIdentifier%)
Instead of rendering as “Parent document” the link will have the actual name of the parent document followed by “(Annotation)”. This is so your list of transclusions will have a title with each transcluded annotation with a link to directly edit the annotation.
Define a Keyboard Maestro macro. You want it to type three keystrokes: Control-Option-Command-O (open the annotation), Control-Option-Command-C (copy item link), and Command-W (close window).
That gets the link to the annotation on your clipboard.
Another Keyboard Maestro macro types “{{” and simulates the keystroke Option-Shift-Command-V (paste and match style, which pastes just the Devonthink url).
After that, the macro types “}}” followed by two return keys. That creates a transclusion with the item link.
No hellish regular expressions or BBEdit text factories like my last abominable idea.
Should I actually end up using this notion, I’ll probably use a second tab in DT. Or a second window, either would work. In one tab/window I’ll start a new markdown document for my synopses. The other tab/window will be sort of my shopping cart, where I browse for what I want to use next.
Click on a document with an annotation in the shopping cart tab/window and execute the first macro. I tied it to Option-Command-A, for getting the Annotation.
Click back to the other tab/window, where you’re building your list of annotations in a markdown file. Execute the second macro, which I tied to Option-Command-Y, as in either sYnopsis or “Y not?”
Repeat for each annotation you want to transclude.