Inserting Finder tags as hashtags into plain text files

I’ve just discovered a terrific utility that takes the Finder tags on a plaintext/Markdown file and inserts the tag as a “hashtag-tag” into the file, either at the bottom, or at a specified line from the top. It works beautifully for my use-case: like @macsparky, I’ve been getting deep into #Obsidian for my note-taking system (#Zettelkasten, #PKM). This is huge, because it allows me to use search criteria in Finder to select Markdown notes files, and then apply Finder tags to them in one batch (or automatically, using #Hazel), and then let the utility insert corresponding #tags as plain text in the document. (Though sometimes I need to (temporarily) put the files in a separate (sub)folder, since the utility runs the conversion on all files in the folder.)

It’s the work of genius Christian Tietze and is available from his Github repository:
The only caution is that, when it runs, it converts everything in the target folder (or, as het puts it, “directory”). Safe enough, and you have to confirm before it does it, but just keep your wits about you.

P.S.: Note also that #DEVONthink has a way to do the reverse: it takes hashtags it finds in a plaintext file and adds them as Finder tags.
P.P.S.: You can specify where the tags are inserted: at the bottom (default) or X number of lines for the top. Now that Obsidian supports putting tags in the YAML metadata, it would be great to have a version of this utility that added the tags at line 2, just below the metadata indicator ---, and add the necessary YAML text, but that might need to wait for someone to write an Obsidian plug-in…


@JoelAnderson - Thanks for this find. Christian is such a benefit to the community. I’ll check it out.

1 Like