Annotation Pane (Annotation with Links, Notes, Tags v3)

Hi Frederiko,

Once again I’m here to appeal to your generous help.

In my case I use this script as a tool for my literature review: read and annotate documents - notes, ideas, etc…
First I have two main groups/folders called “Primary Sources” and “Secondary Sources”. Inside these groups I place/index each Document in one sub-folder/group (for example: “Leach 1997”).
When working with one document, I’m interested to place all related annotations inside the same document folder (or in a group inside that folder).
For me this is the better way to organize my work.

Considering the script I ask:

--DEFAULT LOCATIONS -----------------------
-- The default location where document groups and annotations are stored
property groupLocations : "Inbox/annotations/groups"
property annotationLocations : "Inbox/annotations/text"

1. It’s possible change the “default locations” to the same path of the document?

2. Why the script create two folders (“groups” and “text”)? Are both necessary? Can the script work only with one (“group” for each document)?

Thanks for your patience and generosity.

Paulo

Hello Paulo

The two folders serve different purposes but contain replicants of each other. The “groups” is intended to be a “hidden” folder. You should never need to go into it. It contains a groups that are unique to every annotated document. When you click the URL link of an annotated document, it takes you to this “hidden folder” which contains replicants of every annotation to that document, no matter where those annotations are actually kept. This hidden group is already replicating to some extent the functionality you want by linking the document to the annotations. You find it by clicking the URL link at the top of a document.

The “text” group is the default location for text annotations - that is an easy place to find all annotations. Checking the “Set annotation location checkbox” in the annotation pane brings up a standard group selector panel which allows you to choose any location to save your text annotation. You could check the “Set annotation location” checkbox and choose to store your annotation in the same group as the document. I can see however if you wanted that as the default location that it could be tedious.

No by default you cant do this. I have however produced a modified version of the script which will do what you want. You can download it here. (This is not intended for general use but only for Paulo’s specific request)

Frederiko

Hi Frederiko,

Many, many thanks for the ‘exclusivity’ :smiley:
Deeply grateful.

If I’m not wrong, the difference is: instead the annotations go to the default “text” group they remain on the same group/folder of the document. Right?

Considering the implicit process, when finished the review of document the result is a folder with the document and the annotations (single annotations). In my workflow the logic of ‘single’ annotations is important: tagging, comments, etc. But at the end I feel the missing of a general view, a kind of “scrivening mode” (Scrivener) to view all the ‘single’ annotations together but keeping all the singular metadata (links, tags, etc.) - just a more practical view mode (different from the “Merge”). Maybe a feature to one future DTP version :smiley: :bulb:

Once again, thank you.

Best regards,

Paulo

I support the request of a Scrivener-like contiguous view of documents in DT. But by now Annotation Pane has become such a central part of my work in DT that I’m worried it may not work in the next version!

I have a question as well: So far, all the created annotations are excluded from search, classification and see also. I have tried changing the permissions to the general text folder which contains all replicates. To no avail, so I carry on changing this setting manually to several notes from time to time. Is there a way I can change this automatic behaviour in the script?

Thanks so much,

Jose

Agreed, it would be a great feature. Maybe something as straightforward as being able to edit and view selected rtf/ formatted note or markdown files as a contiguous file?

Pleased its working for you :smiley: Its so central to my workflow too that I will do what I can to keep it working.

Are you using the latest version of the script (305)? This was a problem which was fixed a few versions ago (I hope) and I am not seeing it. Only folders in the “annotations/groups” folder are excluded from see also, etc which is the desired effect. The annotations and the “annotations/text” folder should definitely not be excluded. (EDIT: realised from your previous posts you are using 305. I will have to do more testing :frowning: )

Frederiko

Let’s make a force to the DT team consider this feature! :wink:

1 Like

Hello Frederiko,

I’m here once again…

Allows me put one scenario with some problems…

Scenario
I’m interested in organize my notes, ideas, annotations, etc., with tags. Tagging is a fundamental resource to my workflow…
In a big project we can imagine the large number of tags. So, for better organization I adopt the solution of “tag groups”, naming this groups by topics: “Names”, “Concepts”, etc. Inside each group we have the related tags (the ‘real’ tags)! “Names” > “Adorno”; “Benjamin”; “Lukacs”; …

Define “Special Groups” and “Extra Groups” on config.scpt
With the ability to use until 5 tag groups on Annotation Pane (2 special and 3 extra) I defined this groups on config.scpt (note: I defined these groups before installation, i.e., before copy “Annotation Pane.scptd” to “Scripts Folder”)

Using tags
On tagging something, the goal are the ‘real’ tags, not tag groups. Because of that I prefer to exclude ‘tag groups’ from… tagging!
Using the previous example, I’m interested in the tags “Adorno”; “Benjamin”; “Lukacs”; … but not in “Names”. So, in the group “Names” I enable the option “Exclude from…tagging”.

The problem
The next time I use the Annotation Pane - for example to tag an annotation with some tag on tag group “Names” - this is the behaviour:
1 - DT create another tag group with the same name (a second folder with name “Names”) with the option “Exclude from…tagging” disabled;
2 - the ‘real’ tag (an existing tag - for example “Adorno” - or a new one - for example “Cacciari”) is placed on the previous group (for example, on the original group “Names” - the group with the option “Exclude from…tagging” enabled)
In this example, the annotation is tagged on tag “Adorno” placed on group “Names” (that is excluded for tagging) and tagged on tag “Names” folder enable for tagging:

“Names” > “Adorno"
“Names"

There is a solution to this problem? With the Annotation Pane script there isn’t a possibility to exclude from tagging the tag groups?

Thanks.

Paulo

Hello Paulo,

I didn’t realise you could exclude tags from from tagging! I can’t see a purpose for this.

The purpose of tag groups in the Annotation Pane is as an organisational tool. Tag groups put tags which are of a similar type, such as names or places, into a related place. This makes consistent tagging, and searching on those tags, easier. As Bill has pointed on this forum, the biggest reason for failure of tag systems, is that its very difficult to tag consistently. Tag groups are supposed to help with this by putting logically related tags together.

You seem to be trying to do something else with tags but I don’t understand what it is.

I do not understand what the problem is. What do you want to achieve? Could you post a screenshot to help me understand.

It appears you are creating several tags/tag groups with the same names. I haven’t tried it, but I think these duplicate tags would simply be replicants of each other.

Frederiko

Yes, I’ve been using version 3.05. For what I have checked, replicants share the same properties. When I change manually the setting of an annotation in the annotations/groups folder to be excluded from See also, it changes as well in its replicant in the annotations/text folder.

If the properties of the annotations/groups folders are inherited by an annotation file, according to the above test its replicant in annotations/text will be changed as well. If this is so, I don’t know what happens when two folders have conflicting property settings.

If the properties of a folder are not inherited by files, I do not know how they affect by themselves searching in DT.

I’m just trying to be of some use. If the above is not correct and I can be of any help, please let me know: If I knew the code that was changed to correct this behaviour, I could check if it is right in my copy of the script.

Hi Frederiko,

Let me try to be more clarifying (write in a foreign language isn’t my great ability). Let’s do it step by step (with images).

step 1 - The structure of my Database “TESTE”
I want to work with 5 main tag groups: “1.Tag Group1”; 2.Tag Group2"; “3.Tag Group3”; “4.Names”; "5.Concepts”.

https://www.dropbox.com/s/bfv4621kfx82ov4/1_structure.png?dl=0

step 2 - Define “Special Groups” and “Extra Groups” on config.scpt
With the ability to use until 5 tag groups on Annotation Pane (2 special and 3 extra) I defined this groups on config.scpt (note: I defined this groups before installation, i.e., before copy “Annotation Pane.scptd” to “Scripts Folder”)

https://www.dropbox.com/s/k0epyegisse9owl/2_scrip.png?dl=0

step 3 - tag groups vs folders

As you mentioned, I want to use the tag groups as an organisation tool (the ‘real’ tags are the tags inside these folders). So I prefer to see this ‘tag groups’ as a folders. But DT see them also as a tags.

https://www.dropbox.com/s/3u15v49qhooy3q2/3_tag1.png?dl=0

step 4 - exclude tag groups from “tagging"
To solve this, the solution is enabling the option “Exclude from…tagging” (“Info” panel) to the desired tag groups (On the example I do this to the tag groups “4.Names” and “5.Concepts”)

https://www.dropbox.com/s/vy17akspwbfwdca/4_tagging.png?dl=0

Doing this not affect the tags inside each folder(tag group). As you can see on the next image, the “4.Names” and “5.Concepts” are removed from tag list but the ‘real’ tags don’t.

https://www.dropbox.com/s/caf23pmga02itzm/5_tag2.png?dl=0

step 5 - testing the tags with a document
On my test database, “Adorno” is a tag inside “4.Names” folder and “Autonomy” is a tag inside “5.Concepts” folder. If I tag a document with one or both tags, the document remain tagged with only that tags. But, for example, if I disable the option “Exclude from…tagging” on the folder “4.Names” (activated on step 4), then the document acquires one more tag - the tag “4.Names”.
As said before, on my database the ‘tag groups’ works like organization folders. So, I adopt the solution “Exclude from…tagging” in these folders.

step 6 - testing the tags with the Annotation Pane
Let’s try the same with the Annotation Pane.
In a document, select text and launch the Annotation Pane.
(Remember: now all my tag groups are excluded from tagging)
step 6.1 - testing the tagging only with ‘special groups’
On the example I assign the tag “Adorno” on “4.Names” and “Autonomy” on “5.Concepts” (and add a new tag “test1” on “5.Concepts”).

https://www.dropbox.com/s/v5dthlutxxpaqic/6_AP1.png?dl=0

The result is perfect: the new annotation document is classified with the three tags and everything runs fine on the database tags structure - the tag “Adorno” is activated on the group “4.Names”, the tag “Autonomy” on group “5.Concepts” and the new tag - “test1” - is created inside this group.

https://www.dropbox.com/s/otseqw6phvb8tgi/7_structure2.png?dl=0

step 6.2 - testing the tagging only with ‘extra groups’
(Remember: now all my tag groups are excluded from tagging)
I have three 'extra groups’(the maximum allowed on the script): “1.Tag Group1”; 2.Tag Group2"; “3.Tag Group3”. Inside “1.Tag Group1” I have the tag “extratag”.
Let’s run the Annotation Pane.
On the example I assign the tag “extratag” on “1.Tag Group1” and create a new tag “Benjamin” on “2.Tag Group2”:

https://www.dropbox.com/s/o0taqwvkk148evy/8_AP2.png?dl=0

The result is a disaster: the tags are affected to the existent groups (“extratag” on “1.Tag Group1”; “Benjamin” on “2.Tag Group2”), but are created new independent tags - a new “1.Tag Group1” and “2.Tag Group2”.
(Note: As you can see I use personal icons on my database, but I leave the original icons on this steps precisely to differentiate the results)

https://www.dropbox.com/s/3z2qgds5al1pjat/9_structure3.png?dl=0

Now, my new annotation document is classified with four tags:

https://www.dropbox.com/s/ky4tw3cctdo28wr/91_tags.png?dl=0

Conclusion
There something happening with the “extra groups” in comparison with “special groups”. As we can see there’s a different behaviour: the “extra groups” have problems with tag-groups/folders excluded from tagging.

Paulo

Thanks for this script. I could install it.

It seems useful to add a note to a file. Just a few questions to get a good start:

  • Can you only one note per file (rtf text, pdf, etc.) or several ?
  • Is there a way to highlight the word that is commented (in a colour)? That would be awesome.
  • Where is the file containing the annotations located? Is it visible in the database hierarchy?

Thanks in advance.

As many annotations as you like per file.

Cmd-Shift-L applies the currently highlight colour to the selected text, or select a different colour from the format menu.

By default annotations are stored in the Inbox/annotations/text folder but this can be changed either in the configuration file or by selecting the “set annotation location” checkbox which will allow you to choose where to store annotations on a note by notes basis.

This is just one of many annotations scripts on this forum, and unless your need is to keep detailed meta data about each annotation, may be too complex. Its also just a user developed applescript script that is pretty rough around the edges. There are also some excellent professionally developed and reasonably priced third party alternatives such as Highlights which are great for annotating pdfs and which work well together with DT. These might also suit your needs better if you want a more polished solution.

Frederiko

is it possible to use this tool with external readers like Acrobat or PDF Expert?

No

Hi Frederiko,

I’m here, one more time, to put a question about the script! :blush:

When activated “page number in annotation name” (prefix the annotation name with the page number), the script processes the first page as the number zero - “000” -, starting the page accounting on zero. This is the pretended behavior?

--PAGE NUMBER IN ANNOTATION NAME
-----------------------------------------
-- pageinTitle : true will prefix the annotation name with the page number
-- property leading digits : 3 sets the number of leading digits for the page number

property pageinTitle : true
property leadingdigits : 3

Thanks.

PM

i haven’t yet taken the plunge with this script, but i’m excited to do so.

before i do, i’m wondering:

(1) i’m interested in using DTTG to annotate and tag pdf’s on my iPad/iPhone. (ideally, i wish it was possible to use this script with iOs devices, but that doesn’t appear to be possible.) would i face problems if i tagged and annotated pdf’s via DTTG and use this script?

(2) the main problem i faced with using the 2.0 version of the script wasn’t the script, per se (which is brilliant), but an organizational dilemma that emerged when using it. namely, i struggled to find an organizational approach that enables me to maintain focused tags per each separate (but related) project so that i can keep granular focused tags (e.g., people & issues for articles) and the larger, globally-themed tags (e.g., people & issues for a book - that might relate to a batch of articles). i welcome suggestions that would help allow me to use this script while creating a manageable a micro/macro tag system.

thanks very much.

Ditto those questions. I’d be curious about the answers, and if folks could recommend other approaches for organizational approaches.

I really love the annotation and tag features (esp. in @Frederiko’s brilliant script), but I’ve struggled to find an organizational solution that allows me to create pages for particular projects, as well as larger projects with overlapping themes. (I’m certainly happy to consider a non-tagging option, too, by the way.)

In case it is of interest to anybody, I am using Annotation Pane to insert Bookends citation keys in each annotation, which can later be converted with pandoc to many file formats. I achieve this by naming the pdf to be annotated with its citation key, such as [@williams2005met], without the .pdf extension, so that such citation key is included by Annotation Pane’s as pageLink in each annotation.

In order to include the real page number of each annotation in Bookends format, I have modified slightly my copy of this great script. Once the offset between the printed and DT’s hyperlink page number is manually set in the script for each pdf to be annotated (9 in the quoted code), Annotation Pane includes citations with page, such as [@williams2005met, p. 35], as pageLink in each annotation. I keep an eye for annotations spreading over several pages to edit them manually.

Original:


set printPageNumber to "(Pg. " & ((currentPage) as string) & ")"

The modification I am using:

set trimSourceDocument to (characters 1 through ((length of (name of sourceDocument as string)) - 1) of (name of sourceDocument as string)) as string

set printPageNumber to trimSourceDocument & ", p. " & ((currentPage + 0) as string) & "]" & "\r(Pg. " & ((currentPage) as string) & ")"

I don’t know enough Applescript to add a check box to select whether the pdf has a Bookends citation key and requires adding the page printed in the pdf, nor to add a box to set the number of offset pages, so I do it manually in the script for each pdf. Yet, for the use I give Annotation Pane in DT, this workflow saves me time overall.

seems users can’t use this script with iOS or with DTTG. that’s too bad.

are there any other hack solutions that would enable users to achieve roughly the same features provided by the script in DTTG (or in iOS, through another app)?

also, i’m wondering if other users have additional insight or suggestions re: the second question, namely:

would really appreciate ideas or insight.

thanks very much.

and

I don’t have any real answers for you but two possible avenues to explore might be smart groups, which can search across all databases and can be placed in the side bar, or indexing common themed documents so they can be included in multiple databases.

Frederiko