You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%*
// This template script assumes that all letters will be laced in "Personal/Letters to Self";
// Plugins being used: Templater, Custom JS, Dataview, Obsidian Linter
const path = "Personal/Letters to Self";
const status = await tp.system.suggester(['Letter to Self', 'Reply to Self'], [true, false], true, 'type');
var selectedFile;
var title = "";
var deliveryOn;
if (!status) {
const filteredFiles = app.vault.getMarkdownFiles().filter(file => {
return file.path.startsWith(path);
});
selectedFile = (await tp.system.suggester((file) => file.basename, filteredFiles));
await app.fileManager.processFrontMatter(selectedFile, (fm) => {
if (fm.title) {
title = fm.title
} else {
title = file.name
}
});
}
title = await tp.system.prompt("Title", !status ? "Reply to " + title : "");
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters