Any way to expose metadata in Markdown documents to DT?

Removing quotation marks from titles (where they wrap titles in YAML, but aren’t part of the names) just became a lot easier (for me) in version 3.5. It can now be done in a Smart Rule using regular expressions.

I’ve scanned the name for the regular expression ^[\"\'](.+)[\"\']$ which means: “Look for a name with single or double quotes at the beginning and end, and if you find that, capture the text between them.” Then I replace the name with the captured text, which is just \1, or in other words, the first capture-group.

So, this looks like:

Screen Shot 2020-05-14 at 10.48.05 AM

One quirk is that renaming an item with @pete31’s Applescript above doesn’t trip the “On Renaming” event in Smart Rules, though I think that would be the most natural trigger. So I’ve used the “On Moving” event to trigger it.

1 Like