# Summarise Highlights as csv

**URL:** <https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210>\
**Category:** DEVONthink\
**Tags:** feature-request\
**Created:** [December 13, 2020, 9:47am UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210 "2020-12-13T09:47:37Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![MacDav](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/m/d6d6ee/32.png) [@MacDav](https://discourse.devontechnologies.com/u/MacDav)\
**Post date:** [December 13, 2020, 9:47am UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/1 "2020-12-13T09:47:37Z")

</div>

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](https://forum.eastgate.com/t/exporting-annotations-from-devonthink-to-tinderbox/3194/24) 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)

---

<div class="post-metadata">

**Author:** ![MacDav](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/m/d6d6ee/32.png) [@MacDav](https://discourse.devontechnologies.com/u/MacDav)\
**Post date:** [December 15, 2020, 4:24pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/3 "2020-12-15T16:24:54Z")

</div>

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](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/4/2/42e27b035d38aa7fa9874b62a020e1405a080a66.png)

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [December 15, 2020, 4:47pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/5 "2020-12-15T16:47:30Z")

</div>

`«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?

---

<div class="post-metadata">

**Author:** ![chrillek](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/chrillek/32/29340_2.png) [@chrillek](https://discourse.devontechnologies.com/u/chrillek)\
**Post date:** [December 15, 2020, 4:59pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/7 "2020-12-15T16:59:37Z")

</div>

> [@pete31](#):
>
> You can’t create a CSV in DEVONthink

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 😉 ).  
If you really need a CSV (_comma_ separated values), it’s trivial to convert the tabs to commas.

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [December 15, 2020, 5:22pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/8 "2020-12-15T17:22:29Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [December 15, 2020, 6:10pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/9 "2020-12-15T18:10:03Z")

</div>

@BLUEFROG, @cgrunenberg here’s help needed.

The [script](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/2)

- 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

[![](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/4/2/42e27b035d38aa7fa9874b62a020e1405a080a66.png) ](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/4/2/42e27b035d38aa7fa9874b62a020e1405a080a66.png)

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

Any idea what might be going on here?

---

<div class="post-metadata">

**Author:** ![BLUEFROG](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bluefrog/32/135_2.png) [@BLUEFROG](https://discourse.devontechnologies.com/u/BLUEFROG)\
**Post date:** [December 15, 2020, 7:53pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/10 "2020-12-15T19:53:08Z")

</div>

I’m seeing no error here.

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [December 15, 2020, 7:58pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/12 "2020-12-15T19:58:01Z")

</div>

Thanks. It’s working fine over here too. I’ve really no idea where “missing value” could come from.

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [December 16, 2020, 4:23pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/14 "2020-12-16T16:23:35Z")

</div>

@MacDav you might want to take a look at [Script: Create “Summarize Highlights” TSV for import into Tinderbox](https://discourse.devontechnologies.com/t/script-create-summarize-highlights-tsv-for-import-into-tinderbox/60295)

---

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [January 7, 2021, 1:04pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/15 "2021-01-07T13:04:24Z")

</div>

> [@MacDav](#):
>
> 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.

The next release will add this.

---

<div class="post-metadata">

**Author:** ![MacDav](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/m/d6d6ee/32.png) [@MacDav](https://discourse.devontechnologies.com/u/MacDav)\
**Post date:** [January 7, 2021, 8:20pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/16 "2021-01-07T20:20:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [January 8, 2021, 11:37pm UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/17 "2021-01-08T23:37:52Z")

</div>

> [@cgrunenberg](#):
>
> The next release will add this.

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.

> - Tab-delimited: supported for file drag drop and copy/paste of table data. For files use ‘.txt’ or ‘.tsv’ file extensions.
> - CSV: supported for file drag drop (CSV copy/paste is not supported). For files use the ‘.csv’ file extension.  
> [A Tinderbox Reference File: Spreadsheet (Tab-Delimited Text) Import](https://www.acrobatfaq.com/atbref8/index/Import/SpreadsheetTab-Delimited.html)

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 😄. That leaves us with a CSV record in DEVONthink and a CSV file in Finder.

---

<div class="post-metadata">

**Author:** ![BLUEFROG](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bluefrog/32/135_2.png) [@BLUEFROG](https://discourse.devontechnologies.com/u/BLUEFROG)\
**Post date:** [January 9, 2021, 4:29am UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/18 "2021-01-09T04:29:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [January 9, 2021, 4:40am UTC](https://discourse.devontechnologies.com/t/summarise-highlights-as-csv/60210/19 "2021-01-09T04:40:14Z")

</div>

Awesome! 😃
