New user's questions re: Export Highlights to Markdown function

Hello, very new to the program and the forum, with misapprehensions about asking the wrong questions…

I have begun to use DevonThink in direction connection to my research/notes platform, Roamresearch.

I read and annotate many PDFs in DevonThink Togo, then export highlights (and notes, importantly) to Markdown, then copy/paste that markdown into Roam. This is amazing: everything is so well linked back to DT and I love how well it works. Except for one thing:

DT uses the {==text==} markdown highlight syntax and Roam uses ^^text^^. Is there a way to change this in DT? I cannot change it in Roam. I could write an intermediary script… but that would add steps so I thought I would ask if I had access to the DT scripts to make this change first.

Thanks for this wonderful community. I have answered so many questions on my own here already.

1 Like

After some googleing I think that == is more prevalent then ^^ to highlight text in MD. So it would be more reasonable to ask the roam people to change.
Alternatively you could use the HTML element <mark> for highlighting. That should work across all platforms.

The Roam guys have already been asked and they indicate that they are staying with ^^. DT won’t export with <mark>, though, right? Only {==. It isn’t a big deal, I’ll write a script to do the conversion… I only run this once per book or article so an extra step is OK.

May I ask why?
We’ve often said, this is an open place to ask questions and discuss things.
And the only dumb questions are the ones unasked (or trolling ones).

As long as there are no personal attacks on anyone (which you certainly show no inclinaton toward), all will be well :slight_smile:

PS: {==highlighted text==} is the CriticMarkup syntax supported by MultiMarkdown, which we use in DEVONthink. It’s unfortunate Roam is implementing their own syntax but such things are something to consider when choosing apps to work with.

1 Like

You can put any valid HTML in MD, and I have yet to see a program that does not “export” that.

I’m talking about the generated Markdown created by the Export Highlights command run on an annotated PDF. I was wondering if I had access to the code running that command so that I could change it and simplify my workflow.

Roamresearch indicates that {== or == are not the standard in Multimarkdown… with some attitude about it as well… alas, not all tools are as flexible as DT.

According to this Comparison of features in various Markdown flavors · GitHub gist, no MD dialect uses ^^ for highlights. That might be related to the fact that ^ is often used for superscript.

But that fact probably does not help against attitude.
So your best bet might be a small script (about five lines in JavaScript) that does the conversion.

Roamresearch indicates that {== or == are not the standard in Multimarkdown…

That is technically correct, as it’s CriticMarkup syntax, which MultiMarkdown supports.

alas, not all tools are as flexible as DT.

This is indeed true :slight_smile:

I developed a fix that led me down a very cool rabbit hole. On OS X you can make your own services with Automator. I made a service that filters the text on the clipboard, changing the DT highlight markup to the Roamresearch markup and then putting the result back into the clipboard. I assigned this service a keyboard shortcut as well. So now I copy the markdown from DT, press a key combo, then paste into Roamresearch and all is well.

2 Likes

Glad you made your own custom method. :slight_smile:

Wonderful! Could you please share your Automator file?