Bookends, DT3, and annotations

See this topic.

I don’t mind at all… I’ll tidy them up slightly and do a small intro and then post them. Warning: they are very rough and ready, so it’s at the user’s risk!

1 Like

OK, here you are. First things first: many thanks to korm and Frederiko who are responsible for all the good bits in the scripts. I hope they don’t mind what I’ve done with it.

Secondly, the usual disclaimer before you use them: “Use at your own risk. I don’t know what I’m doing so these scripts will probably eat your files, your computer and your dog and it won’t be my fault because I’ve warned you not to use them unless you do know what you’re doing.”

There is one Keyboard Maestro Macro which calls two scripts.

The first (imaginatively called KM Citation Notes 1a (DB)) picks up various details from the currently selected DT document (name, page number etc) and stores them in variables for the KM macro to use.

The macro then calls a dialogue box for you to enter details, which are in turn fed back into the second script (KM Citation Notes RTF (DB) 6), which actually creates the new RTF annotation document.

(There are various versions of the macro and the second script, but they are very closely tied to my workflow and they’re a bit too specific to be generally useful, I think.)

To set up:

  1. Put the two scripts somewhere in your file system
  2. Import the macro into Keyboard Macro, then change the two Execute Script actions to pick up the scripts from where you left them.
  3. Change the KM trigger to taste (I run it off a palette, so can use a single letter trigger).

That should be it. Some things to notice:

  • it will add a leading zero to single figure page numbers (2 becomes p02) to assist sorting, but it doesn’t deal with 3 figure page numbers yet (99 won’t change to 099).

  • it will populate fields with previous values which is usually what you want, but occasionally isn’t, so check them before pressing OK…

  • if you highlight some text before running the macro, a citation section is created quoting the text you highlighted. Unfortunately the script mangles some characters (smart quotes mostly) in the quotations so you may have to make a couple of corrections. There must be a way of stopping this happening, but I don’t know what it is…

Can’t think of anything else at the moment. Hope it’s useful, but do search for posts by Frederiko and korm on annotations for their later developments.

KM Citation annotation scripts (DB).zip (26.5 KB)

1 Like

Much appreciated, Brookter. After taking appropriate measures to protect my dog, I’m going to look into using this.

Thanks for sharing your macro, @brookter! I am still thorn between using DT3 and Bookends for reading pdfs. Should I decide for the former, I will surely be using your macro to take notes.