I'm trying to set up a routine to do the following, and would like some help.
I have a folder of MD (markdown) files for Logseq and I would like to add some metadata to them. It seems I can match files which have the contents:
tag:: contact, ... (Ignore rest of line)...
but then I would like to add a line below that to all the matching files so that it looks like this:
tag:: contact, ... (Ignore rest of line)...
icon:: [human emoji]
As best I can tell I should probably run a script on the matching items. There are choices for shortcuts, applescript, java script, shell scripts, etc. I don't really care which, but would love to have a working example of a script that does Regex search and replace which I could modify for my own needs. I'm pretty handy with RegEx but terrible at the scripting part.
thanks!