chhoumann / PodNotes

PodNotes is a plugin for Obsidian that helps the user write notes on podcasts.
https://podnotes.obsidian.guide
MIT License
217 stars 9 forks source link

[FR] Add a handlebar variable for the safe title version of a note #52

Closed scottmc42 closed 1 year ago

scottmc42 commented 1 year ago

Proposal: Add {{safeTitle}} as a placeholder in templating notes.

Notes: In trying to integrate this with Dataview, I'm trying to create a link to the podcast notes I listened to/added notes on for a particular day. But that's proving difficult because I only have access to the original title in my frontmatter, not the "filename safe" version of the note.

For instance, the title of an episode is: "#387: Build All the Things with Pants Build System", but the actual name of the file is "387 Build All the Things with Pants Build System"; missing the # and :.

As a workaround, at least for Dataview, I can use regexreplace(title,"[\\,#%&/{}*<>$'\":@‣|?]", "") to filter out all the same characters. But there may be other situations where someone would want the filename as well as the title of the podcast.

There may also be a workaround using js in Templater, but that seems like a lot of work for something that should already exist.

chhoumann commented 1 year ago

Added in 2.3.0 :)