Script to Export Certain DEVONthink Metadata in a TSV for Tinderbox Import


(Paul Walters) #1

This script is an extensive modification of a built-in script provided by DEVONtechnologies, and exports the following metadata for selection of DEVONthink records into a tab-separated file (.tsv) that you can drag into a Tinderbox document where a set of notes is created – one for every DEVONthink record in the selection.

https://d.pr/f/zolTSk+

Metadata:

“Name” name of the document in the DEVONthink database
"Kind" kind of database record - PDF, RTF, etc.
“SourceCreated” date the record was added to the database
"Author" if the record has an Author property, the value of that property
"Recipient" if the record has a Recipient property, the value of that property
"SourceURL" if the record in DEVONthink was imported from elsewhere (e.g., a website) the URL of that location
"Tags" Tags of the database record
"Comments" Spotlight Comments of the database record
"URL" the x-devonthink-item:// reference URL to link back to the record in DEVONthink

The file created by the script is TSV because Tinderbox 7.x does not deal well with CSV files created from DEVONthink databases, and TSV is better for documents that might contain quotes in the metadata.

Do not use the script for .eml records at this time. DEVONthink’s current version has broken the handling of the reference URL (x-devonthink-item:// URL) for email imported into DEVONthink, and the fix to work around this will take more time than it is worth to me. I don’t plan to spend much time on maintaining this script. I assume the reader knows how to compile and install AppleScripts for use in DEVONthink and other applications. YMMV.


How do I prevent TB to fetch the contents of PDFs when dragging 'n dropping from Devonthink
Tinderbox and DEVONthink Pro
Workflow of notes in Devonthink Spotlight comments
(Malcolm) #2

This would be perfect if it also had the option to export not only the title but also the text of the note (e.g. text, RTF etc…) of the DT note. All the other required MetaData is already included.


(Paul Walters) #3

An easy modification, if you want to go ahead and change the script – please post your update to the thread, here.

Of course, subsequent to the publication of the script, above, current versions of Tinderbox now watch DEVONthink groups and grab the text, etc.