Importing from Raindrop: tags not recognized

I exported the html file from Raindrop to import. This is the format:

<DT><A HREF="https://" ADD_DATE="1639247418" LAST_MODIFIED="1639247467" TAGS="tag1" DATA-COVER="https://">Test</A>

Devonthink doesn’t recognize tags. Is there a way to fix it?

Did you use File > Import > Bookmarks from HTML file…? This doesn’t support such tags currently.

In this context, “TAGS” is just an arbitrary non-standard HTML element (and the HTML itself is kind of broken).

With a script. But some more context would be nice, like

  • is HTML the only export format available
  • is this the complete file
  • if not, what does the complete file look like

@cgrunenberg Yes, I tried that feature: File > Import > Bookmarks from HTML file

@chrillek Yes, HTML is the only format available.

Then a script should scan for the tags and set them on the DT record. The relevant JavaScript code would look like that

const text = record.plainText();
const tagMatches = [...text.matchAll(/tags="([^"]*)"/gi)];
tagMatches.forEach(match => {
  const tag = match[1];
  // Add tag to list of tags for this record

I’ll try, thanks.

The next release will support tags in this case too.