Template scripts for Annotation templates?

In DEVONthink 3.7, is it possible to create annotation templates that are scripts, like other templates can be? I.e., would creating a .templatescriptd type of template work for an annotation template placed in the Annotations.noindex directory?

No, smart templates aren’t supported as Annotation templates.
To what end?

To what end?

Here are two reasons:

  1. DEVONthink supports a number of template placeholders, but there are still other things I’d like to put into an annotation template for which there are no predefined placeholders. For example, if I wanted to create an annotation template in markdown that included the highlights from a PDF being annotated, the only way to get the annotations is currently to use the AppleScript command summarize highlights of. I could implement some AppleScript code to create a custom placeholder if annotation templates could have the same form as regular templates.

  2. I use Zotero for reference management, and I index my folder of Zotero papers using DEVONthink’s indexed folder mechanism. I also use a software utility I wrote (Zowie) to write the Zotero record URI for each PDF file into the Finder comment of the PDF file, which makes it accessible from DEVONthink. I would like to write an annotation template for reading notes, and create a custom placeholder to insert the Zotero link into the annotation document.

Those are two limitations of the current annotation scheme in DEVONthink that could be remedied by allowing annotation templates to have the same scriptable form as the other templates.

Sounds like things very custom to your setup. Development will have to assess the feasibility and broad appeal of this. Thanks for your patience and understanding.

Perhaps it seems like this is a custom/advanced use case, but on the other hand, I think it could be argued that the current arrangement in DEVONthink is conceptually inconsistent. Here’s why. Non-annotation templates can be single files, or template packages, or smart templates, and the user manual describes how they work. The manual even suggests inspecting the sample “Project” smart template for ideas and inspiration. So, when creating an annotation template, it doesn’t seem unnatural to think they could be like any other kind of template in DEVONthink – either a single file, or a template package, or a smart template. But currently, they’re not. The situation feels like an exception (“you can do such-and-such here but you can’t do it there”), which usually leads to more complexity for users and often more technical debt in the software implementation.

Anyway, thanks for considering it!

1 Like