Parsing tags from text files added to DevonThink


I’m using Pinboard as my read later-service. The reason I have chosen Pinboard over Instapaper, Pocket and other dedicated read later-services is that I can use Pinboard’s description field to save highlights from the article and add my own annotations. Using Ifttt, I can then create text files on my Dropbox account. Right now, the recipe I use save files that looks like this:

# What it's like when the FBI asks you to backdoor your software
> The difference now, she explained, was her experiences at BlackHat. Among those, Sell pointed to a BlackHat event where Thomas Cross demonstrated how to break into lawful intercept machines—or wiretaps. "It was very clear that a backdoor for the good guys is  always a backdoor for the bad guys."

> "I'm not against helping law enforcement, but the most important thing to me is protecting my friends and family the best way I know how," said Sell. She suggested that the NSA and other agencies go back to a model where individuals are targeted, instead of monitoring all communications and sorting it out later. "There are plenty of ways to track people without trampling human rights," she said.
*via Pinboard*
*Tags: integrity, internet, encryption, hl*
*January 09, 2014 at 10:20PM* 

Right now, I just leave these files in the Finder. But I would like to add them to DevonThink and automatically have the tags in the text file used as tags in DevonThink as well. Is it possible to write a script that does that? If the script also could exclude “hl” from the tags it would be even better. That tag is what I use to trigger the Ifttt recipe.


A script is possible. is a good resource for sample scripts that parse text.

Another possibility is using DEVONthink’s script to import from Pinboard, which reads the tags in Pinboard’s XML and places them into tags for that document. See Scripts > Import > Pinboard

I don’t have that script available in Import. Is it an add-on?

Yes. See Help > Support Assistant > Install Extras > Scripts. It is on the third page.