TIL: Adding custom scripts with templater
I learned how we can create custom scripts in Obsidian with templater and now it opens another set of possible things that I can do with ...
I learned how we can create custom scripts in Obsidian with templater and now it opens another set of possible things that I can do with ...
I learned how we can create custom scripts in Obsidian with templater and now it opens another set of possible things that I can do with obsidian.
For my case I needed to strip first character of File named with an @ which I usually use for naming humans/companies/organizations.
function humanSnip(human) {
const fileName = human.file.title;
return fileName.slice(1, fileName.length);
}
module.exports = humanSnip;
Step 2: Put this file in some place of your vault except .obsidian folder as this folder is not accessible via templater plugin.
Step 3: Add the folder location in templater script locations
(Local Obsidian asset omitted in web import.)(Where to set script in templater)
Step 4: Use the script as tp.user.humanSnip(tp) or whatever the name of your script was
Suggested by:: @Ximena