What is an annotation
An annotation is a separate document containing the highlight text from the source document and any comment you have made on it. The annotation contains a link back to the original document in the URL field of the annotation (that is the clickable link at the top of the document immediately above the text). The source document has a link back to a special group, unique to the individual source document, which contains all the annotations for that document. Clicking the URL field of the source document will open the group to show all the source documentās annotations. Annotations also assist Devonthinkās AI by breaking up documents into smaller more relevant parts.
Installation
Unzip the attached file and put the Script Bundle in the Devonthink Scripts Folder.
On first use the script will create a new directory structure in the Inbox of the current database to store the annotation files, the source document groups and the configuration file
If you use the script on a database that used v2 scripts, it will update the previous directory structure to the new format
If the mac prevents you from running this script bundle, read this http://support.apple.com/kb/HT5290 on how to change your security settings
Usage
- Select text in a pdf or rtf document.
- Select the script from the Devonthink Scripts menu
Explanation of the fields in the Annotation pane* The Annotation Name field will be the name of the new annotation. The default contents of this field can be changed by editing the configuration file.
- The Date field will set the creation date of the new annotation. The default date is the creation date of the source document in ISO order - year, month, day.
- The Label field values correspond to Devonthinkās label colours (in preferences). The label names may be customised in the configuration file for each database.
- The Annotation Tags field will add tags to the top level of Tags. More than one tag can be added at a time by separating the tags with a ā;ā. You can still enter further tags separated by semi-colons but it wonāt attempt to auto-complete subsequent tags.
- Below the Annotation tags field, custom tag groups can be assigned. By default there are no custom tag groups. Custom tag group can be created by editing the configuration file.
- Bellow the Custom tag groups are two special tag groups. Each tag group has three entry fields. This allows more than one tag to be added for each tag group, with each tag autocompleted. The names of the two special tag groups can be changed by editing the configuration file.
- There are four checkboxes:
[list][*] Open annotation - This opens the annotation immediately after the dialog for further editing. - Notes in comment - Notes will also be placed in the spotlight comment field.
- Set annotation location - By default all annotations are stored in a folder called āannotations/textā in the inbox. If you want to bring up the group selector to choose where to store the annotation, this box should be checked.
- Clips PDF Pages - When this box is unchecked, the annotation will be an rtf file with the selected text and the notes from the Annotation field. If this checkbox is ticked the popup box will allow the range of pdf pages to chosen. 0 will clip the current page. 1 will clip the current page and the next page, -1 will clip the current page and the previous page and so on. This does not effect the original pdf. The annotation is simply composed of a copy of the range of pages. This style of annotation is useful when the source document is graphical in nature, the ocr is poor, or the context of the annotation is hard to express.
-
Copy notes to comment -Any notes in the Annotation field will be added to the spotlight comment field of the annotation.
[/:m][] The Annotation field text will be added as a note to the annotation document.[/*:m][/list:u]
Configuration
The script creates a file called config.scpt in Inbox/Annotations/Configurations. This configuration file allows the setting of per database settings for the annotation pane. In addition to the configuration options above, there are several other options which are detailed in the file.
To edit the configuration file, find it in the database, right click on it and select open with->script editor.
The script also creates a file annotation template.rtf in Inbox/Annotations/Configurations. This is a template file for the creation of rtf annotations. In addition to the placeholders in the file it supports all the standard placeholders detailed at p.128 of the Devonthink Manual. You can edit this file with the standard rtf editor to create a customised template for rtf annotations. If you make a mistake editing either of these files, delete them, empty trash and the defaults will be readded to the database the next time the script is run.
Extras
You can produce a spreadsheet of the annotations and source documents or a summary in a DT sheet. Its also possible to do some quite interesting thing with tags groups to make visualising relationships easier.
The Document Review Pane uses the same configuration file and tag groups to assist with the review of document metadata in the source document. It also provides a useful overview of all annotations in a source document
If you want to know how to quickly go through annotations to a document to revise or modify them, then this post (PDF workflows with DT in macOS) has a helpful description of the workflow.
Custom labels can be easily edited without editing configuration.scpt
If you are interested when tagging is useful and when it is not then this this post and the discussion which accompanies it is useful.
Cautions
If you have been using previous versions back up your database first. All changes should be reversible, but it doesnāt hurt to be careful
Problems
If the script bundle is not working for you, its probably best to pm me (using the forum link to the right of this post), rather than clogging up the forum. Please give me as much information as possible. Screenshots are helpful as are copies of problematic documents. I will send you a link to special āin progressā version which produces a text log which you can send back to me to analyse.
[Updates]
20160421 Minor updates to prevent Devonthink losing focus
20160423 Bug fixes and addition of template files for rtf annotations
20160426 Side panel option added and non iso date time format problems fixed
20160502 Big fixes incl. inconsistent page references & excluding classification. Bates number support added.
20160505 Side panel text selection improved
20160511 Annotation field text selection improved + big fixes
20170908 Dropbox link updated
Unfortunately the file is too big to be hosted here. You can try to download it from here:
https://www.dropbox.com/s/putjs9bfqidb2jn/Annotation%20Pane%20v305.scptd.zip?dl=0
Frederiko