Exporting annotations from DEVONthink to Tinderbox

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?

2 Likes

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.

1 Like

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.

3 Likes

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

Dear Beck,
could you please clarify where is this option?

See Exploding notes and more precisely the Explode pop-over. Do ask if still stuck.

1 Like

How do you set the delimiter “Page”? Thanks

If you read this post (above) you will see the data imports with lines like “Page 2:”. In this post you will see that the inityal big note is split into notes starting like so “6:”.

We can thus deduce the original note was broken on the delimiter string "\nPage " and the delimiter deleted )as per the controls described here. Give it a try. :slight_smile:

I’m facing the same challenge as @dominiquerenauld, to whit to import the the file output through the Summarize Highlights in Devonthink v3. In this case there are 210 notes and I do this quite often so I’ve spent more time how to streamline the process. I share my solution as it could be useful for other TB users who also store and highlight their documents in DevonThink:

  • Generate a Summarize Highlights output file in DevonThink selecting the RTF output option
  • Run the AppleScript found under the following DT community thread to convert the RTF links into their URL equivalents e.g. spell out the links
  • Create a blank TB file and a single note to serve as the basis for the import
  • Select and copy the RTF text (with URLs) into the $Text field of the TB note. This serves as the basis for the import and helps me get around the automatic import mechanism for TB.
  • Apply the TB Explode function to the note using the following settings to generate a single TB note for each highlight
    image

NB: the structure of a DT3 Summarise Highlight file uses a Return to identify each highlight and 2 tabs to identify the link to the PDF file/page, the highlighted text and (optional) the user defined comment for each highlight. See the example below which includes 1) the URL link in blue, 2) the highlighted text from the PDF file and 3) my comment. The 2nd link at the bottom belongs to the next highlight but is included to provide the overall structure of the file.

If all goes well you should have exploded notes that look something like the screenshot below with each note title given by the link to the corresponding page in the Devonthink PDF document.

image

  • My goals is now transform all of the imported notes into the structure that allows me to analyse their content within TB. Specifically I want to 1) Extract and store the link in my own key attribute $DTURL, 2) Set the $Name of the note with my comment text and 3) set $Text to the quoted text from the PDF document. For this I use the Stamp code below applied to each of the exploded notes. NB: For the case where I’ve highlighted text in the PDF file but not provided my own comment about the highlight there will be only two elements to deal with, the text and DT link. Here I simply set the $Name to the highlighted text.

$MyList=$Text.replace(“;”,“\;”).split(“\t{2}”);
if($MyList.size==3){$DTURL=$MyList.at(0);$Text=$MyList.at(1);$Name=$MyList.at(2);};
if($MyList.size==2){$DTURL=$MyList.at(0);$Name=$MyList.at(1);$Text=“”;};

The final result looks something like the screenshot below with all notes now properly labelled and containing a link back to the original highlight in the PDF file stored in DevonThink. From there on I can analyse within Tinderbox and make sense of the notes in the usual way.

2 Likes

@mdavidson that’s an interesting process – but, wow, a lot of heroics just to get something imported into Tinderbox. If only DEVONtechnologies structured and formatted their report in a more user-friendly manner. Or realized that people want to export annotations to use them some place else, so give us options. I use the heck out of DEVONthink, but it is also in the “my way or no way” category of design.

This is why I use MarginNote for annotation and getting data into Tinderbox. MN’s formatting is horrible, but at least it provides several means to export annotations in note-by-note chunks.