Tinderbox Forum

Exporting annotations from DEVONthink to Tinderbox

Hi! I hope you’re fine!
I’m currently working on a project which requires a lot of reading notes and I’m trying to create a new Tinderbox document from the scratch.

Yesterday, I watched this video about reading process and interactions between DEVONthink and Tinderbox and I was wondering, as long as Tinderbox and DEVONthink interact each other, if there was a way to export my annotations, taken into DEVONthink, into a Tinderbox file.
I mean: usually, I read a pdf and annotate it on an ipad. Then, or at the same time, I fill my Tinderbox note cards with its attributes: $Authors, $Tags, and so on and I use a stamp for each container in order to reduce the number of prototypes.

But I could also take notes while reading a pdf directly into DEVONthink:

This is a note

Hence my question: can I export those annotations from DEVONthink to Tinderbox and insert them into a container so that they were read and exploded by Tinderbox? Thanks for your help!

I think this is a task for AppleScript. It should be able to read the DEVONthink annotation info and paste it into a note $Text or other attribute in Tinderbox. If the TBX stores a DEVONthink-type URL to the DEVONthink note then the script can work from the current Tinderbox selected note, find the DEVONthink record, read the annotation, copy it and paste to wherever you desire in Tinderbox.

I’m a bit busy for testing that now but perhaps someone with DEVONthink and AppleScript smarts might take a crack at this?

Key unknown here is: in what form are your annotations: RTF or markdown or some other format? Stored external to the PDF or internally?

If the former, then we can look at working with Tinderbox watching DEVONthink groups.

You want to avoid scripting something that should be solvable within the existing technology, in my opinion. I’ve written 100s of DEVONthink scripts but can confidently advise: scripting is like forging a key every time you want to open a door.

2 Likes

I think the notes I take, as illustrated on the screenshot above, are written in RTF and stored into DEVONthink. I’m not up to write an AppleScript, as suggested by Mark Anderson. I realized that when I tried, this afternoon, to adjust this script you probably know :wink: : http://forum.eastgate.com/t/script-to-export-certain-devonthink-metadata-in-a-tsv-for-tinderbox-import/1105 Let’s forge a key!

So this should work and you can adjust prototypes and tweak the process later.

If your annotation files in DEVONthink are in a group (cleverly named “Annotations” – but can be whatever), then from the contextual menu copy the item link.

In Tinderbox, create a note. Add the $DEVONthink Group attribute to the note, and then paste the item link that you copied above.

Tinderbox will proceed to do its next step automatically. It will add the DEVONthink prototype to the file, and import a copy of each note in the DEVONthink > Annotations (or whatever) group.

Done.

You can copy the notes someplace else – it will not remove the files from DEVONthink to do so. Or you could run agents to merge the text from the imported notes into other notes. Or make aliases for your map.

Or, sit in the sun and enjoy the god of small successes. A rare thing these days.

2 Likes

Thank you for your help! It works in part only, even if Tinderbox does its task perfectly: the text of my annotations — not the text of my notes — isn’t exported and that’s not what I expected. I thought that every annotation that comes along with some highlighted text would be imported and exploded into Tinderbox. I highlighted in black the annotation I’m talking about:


If only I could export every annotation, I would have less work to do into Tinderbox and every highlighted quote would be linked in TBX file.

It might be useful to play around with the “Summarize Highlights” feature in DevonThink. This feature takes all the annotations (highlights and written comments) and saves them to a single file (either RTF or Markdown). This file can then be “exploded” in Tinderbox once it’s brought over, or you can use scripts posted to the DevonThink forums to split them into individual rtf or markdown files in DevonThink itself.

  1. Select a PDF with annotations in DevonThink
  2. Tools–> Summarize Highlights (choose RTF or Markdown)
  3. check the “inbox” for the database in which that PDF resides to find the new file containing the text of the annotations.
1 Like

Sorry, I misunderstood the objective and the files in question.

Ok. Thanks both of you for your help. The second process works too, in a way which can be useful for me since all my notes (highlighted parts of texts and annotations) are exported and exploded in Tinderbox.

I think it could really save me time since usually, I have to switch between DT and TBX, write down my notes into TBX, paste or rewrite some parts of texts and add tags. However, the work is not entirely done: I have, of course, to tag each notes since every tag is different from one note to another and, above all, add manually each page number… unless we forge another key ;)) to export each page number as an attribute? I don’t think it would be a judicious choice since I don’t need an attribute for that. It would be perfect if only each page number was inserted within the same note than the text of each note. Anyway, it’s already a great advance in my reading process.

I think this could be resolved with setting a clever “delimiter” when exploding. If you post a snippet of what the raw text looks like, probably someone can help suggest a delimiter that will group the page number along with the text of the note in the exploded results.

This is a screenshot of the text highlighted from DT:

I finally exported my notes as is, in other words as they are formatted by DT; then, I exploded them in Tinderbox and copied and pasted pieces of texts in Map view. I didn’t save time as much as I would have expected: I have to add manually some things, but I don’t have to switch constantly from one tool to another one. This is the result:

2 Likes

Don’t have time at the minute to test this, but I think if you make the delimiter "Page " then you would get notes that look like this:

3:
processus


3:
psychic de deliason


etc.

At the risk of hijacking the thread, I’ve always loved the trademark @dominiquerenauld pastel tones for your notes. Did you make the shades yourself, or are they variations of the named Tinderbox options?

1 Like

Thank you Derek. I finally add myself a page number to each note. It doesn’t take me a lot of time and I can at the same time review my notes. I mustn’t lose sight of the fact that I take notes with Tinderbox precisely in order to map my notes.

I play with the colour palette, shadow including.

2 Likes

Thanks, @dominiquerenauld. Information presented beautifully seems to make it more meaningful.

Can verify that if you…

  1. In Devonthink, select Tools > Summarize Highlights > Rich Text on a PDF w/highlights
  2. Drag the created file into Tinderbox
  3. Explode on delimiter “Page” and check “Delete delimiter”

…you get what you suspect, @derekvan, with the name of the note being the page number.

1 Like

It works and the link leads correctly to the related page. Thanks.