Summarize PDF Highlights wishlist

I haven’t heard any other opinions, good or bad.

Hi chrillek,

thanks for you help but I’m a bit lost how to use it? As part of a (smart) rule or as a scp-file?

Sorry.

Here’s a script @BLUEFROG made and shared that removes this highlight syntax. I don’t like the highlight syntax and wish it wasn’t added. New users of the app I’ve talked to either don’t like it—it especially makes it harder to dump text into Obsidian, where this highlighting is annoying as well. And sharing this script and smart rule is a big hurdle for newbie users who shouldn’t have to worry about that.

New users of the app I’ve talked to either don’t like it

Inclusion of the highlighting was part of the requests for a Summarize Highlight feature.

Open Script editor with a “new” script and select “JavaScript” in its upper left corner.

Copy/paste the script into it.

Then duplicate one or several markdown records in DT, preferably into their own group.

Select these duplicates and then click the right pointing triangle in Script Editor to run the script.

If that does what you expect, you can copy the script to DT’s script folder (that should be explained in the online help unter the heading automation).

You can not use this script in a smart rule due to current limitations in DT which are announced to be lifted in the future.

The current way is not really useful

1 Like

At least if you only use highlighting. But it is IMHO useful if you use also underlining or strike through.

1 Like

Just wanted to chime in and say that I also find the current approach of highlighting the extracted highlighted text to be unhelpful, and would appreciate a way to turn it off. When I do use the ToolsSummarize Highlightsas Markdown feature, I invariably remove all the {== and ==} markup from the text it produces.

1 Like

Thanks so much.

I tried this script and run into the following error:

Is there anything I did wrong?

My workflow contains underlining, bolding and highlighting. But it starts after I exported my highlights from the pdf.

I would propose:

  1. Summarizing highlights from PDF (and maybe webarchive in the future?) to Markdown results in a quote with the > as the syntax.
  2. As mentioned in the blog article about DT 3.7 from April 2021 the highlighting syntax is adjusted from {== ==} to == == and therefore matches the mentioned tools Obsidian and iA Writer. Even the beta editor from Bear switched from :: to ==.

Do you think this is possible?

No, there’s something I did wrong, although I should have known better. Apologies. Please use this line

const newText = text.replaceAll(/\{==(.*?)==\}/g, "\n\n> $1\n\n");

(i.e. append a g after the closing /).
Sorry again – as I said, I couldn’t test it here

The problem with that is that it breaks CriticMarkup highlighting (which is where {== ==} comes from).

DT3 allows previewing CriticMarkup (with a suitable CSS) and it would be a big step backwards to remove a useful internal feature simply because some external editor doesn’t have that capability, I think.

I think some users have already asked for Obsidian to adopt CriticMarkup, so perhaps it would be good to support that request? Otherwise, if any changes are made in DT3, please don’t let them be at the expense of this useful feature!

1 Like

That is incorrect. We didn’t adjust the highlighting syntax from one to the other. We allow use of the alternate syntax without the braces but the CriticMarkup syntax is still in place.

2 Likes

This would be even better =)

What would be even better ? :thinking:

Mhm, I understood your statement as a plan to allow {== and == as syntax for highlighting. At the moment only text in {== will be show highlighted. But as many other applications uses == this would be great to allow both.

DEVONthink 3 supports both CriticMarkup and alternate syntaxes like ==...==. Tools > Summarize Highlights > Markdown retains the used syntax.

Oh my… you are right. Don’t know why I thought == won’t work and did not tested it before. My bad.

Besides I’m a bit sad about your decision about the syntax of the summarized highlights. I think visual highlights are only necessary if there is a need to emphasize some words between other text. But the exported .md-file with the PDF highlights only contains those highlights and therefore has no need for visual emphasizing.

if it bothers you, you could turn it off with a simple style sheet.

But that would disable all highlights with {==. I think I’ll try those scripts first.