Summarise Highlights as csv

I use Summarize Highlights within DT3 extensively to collect highlighted text + Details (usually in the form of user defined comments for each text passage) from fairly long technical or scientific documents all located in DT3. My next step is to export of these text passages and references to Tinderbox to organise and eventually generate an outline which I use in writing my own documents.
Despite improvements to the Summarize Highlights output the process going from DT3 to Tinderbox is still rather clunky. Details on the steps followed can be found in this post in the Tinderbox Forum.

Now to my request. I suggest a 3rd option for Summarize Highlights in addition to RTF and Markdown which generates the output in CSV format. Why CSV ?

  • CSV is a well recognised format and can be imported and further used in many 3rd party programmes (Excel, Tinderbox, DT Sheets ?)
  • Summarise Highlights output maps readily into 3 columns (e.g. highlighted PDF text/annotation, page ref, Details)
4 Likes

Wow - thank you so much for taking this up @pete31. Iā€™ve given it first spin with the following steps:

  • Edit the script file and property theIndexedOutputGroup_UUID. I do this this way which I hope is correct

theIndexedOutputGroup_UUID : ā€œ172BF9CC-F31E-401C-A19F-A6033E1303A1ā€

  • Select a Summarize Highlights output file within DT3
  • Run the script

I get the following error from the script which Iā€™m hoping you can help me further with.
image

Ā«class DTtyĀ» is raw syntax for type and thereā€™s a known issue with the conversion from type into a string when a compiled script is run from within DEVONthink.

However it seems thatā€™s not causing the problem here. Thereā€™s something missing (ā€œmissing valueā€) - either the indexed group or the record inside the repeat.

Thatā€™s very strange as the script (of course) first gets the indexed group and if this wouldnā€™t be possible DEVONthink would throw an error - but not the one your capture shows.

At the moment Iā€™ve no idea what might be going on, I also ran the script from DEVONthinkā€™s script menu and itā€™s working fine.

Could you please verify that the UUID is the one of an existing group?

You can create a table in ā€œTSVā€ format ā€“ tab separated values. I suppose most table calculations can work with that (Numbers can, in any case, and whoā€™d need anything else on a Mac :wink: ).
If you really need a CSV (comma separated values), itā€™s trivial to convert the tabs to commas.

Tinderbox accepts TSV via dragging or pasting but the latter doesnā€™t make sense with a repeat. I also find creating a TSV far more complicated than simply creating a CSV formatted text record and afterwards changing its extension.

Thereā€™s one more thing why an indexed group is necessary: If you drag a TSV or CSV directly from within DEVONthink into Tinderbox it will be imported as a Tinderbox reference to a DEVONthink record - not as the actual file type TSV or CSV.

However itā€™s great how you all care how to make the script better :slight_smile:

@BLUEFROG, @cgrunenberg hereā€™s help needed.

The script

  • gets selected records
  • throws an error if no records are selected

and

  • gets a record via UUID
  • throws an error if the record is not a group

Although this is done @MacDav gets this error

which probably means either getting the selected records or getting the record via UUID failed.

Any idea what might be going on here?

Iā€™m seeing no error here.

1 Like

Thanks. Itā€™s working fine over here too. Iā€™ve really no idea where ā€œmissing valueā€ could come from.

@MacDav you might want to take a look at Script: Create ā€œSummarize Highlightsā€ TSV for import into Tinderbox

The next release will add this.

2 Likes

Thanks for taking this up. Thatā€™s good news. I look forward to the next release then !

An option that copies Summarize Highlights as TSV would be very useful too.
With such an option we could copy them and paste directly in Tinderbox.

The ā€œproblemā€ with only creating a CSV file is that they canā€™t be dragged into Tinderbox directly, we first have to export the record, then drag from the Finder as otherwise Tinderbox doesnā€™t parse the CSV and creates a note with a DEVONthink reference instead - but I guess you know that :smile:. That leaves us with a CSV record in DEVONthink and a CSV file in Finder.

It will be a DEVONthink sheet, i.e. a TSV file.

1 Like

Awesome! :smiley: