From cdf5d40ca78778f6be7eb7c75296e85c5c2d650c Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Thu, 7 Oct 2021 14:28:32 -0400 Subject: [PATCH] feature: add base note template --- templates/Base Note (Page Template).md | 51 ++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 templates/Base Note (Page Template).md diff --git a/templates/Base Note (Page Template).md b/templates/Base Note (Page Template).md new file mode 100644 index 0000000..82b30cb --- /dev/null +++ b/templates/Base Note (Page Template).md @@ -0,0 +1,51 @@ +<%* +const title = tp.file.title +const dailyNoteRegex = /^(\d{4}-\d{2}-\d{2})/g + +// "App" Notes +if (title.includes('(App)')) { + return tp.file.include('[[App (Page Template)]]') +} +// "Book" Notes +else if (title.includes('(Book)')) { + return tp.file.include('[[Book (Page Template)]]') +} +// "Build with Ben - Episode" Notes +else if (title.startsWith('Build with Ben (E')) { + return tp.file.include('[[Build with Ben Episode (Page Template)]]') +} +// "Daily" Notes +else if (dailyNoteRegex.test(title)) { + await tp.file.move("/reports/timeline/Daily Notes/" + title) + return tp.file.include('[[Daily Note (Page Template)]]') +} +// "Focus Session" +else if (title.startsWith("Focus Session")) { + return tp.file.include('[[Focus Session (Page Template)]]') +} +// "Japanese Tutoring Session" Notes +else if (title.startsWith("Japanese Tutoring Session")) { + return tp.file.include('[[Japanese Tutoring Session (Page Template)]]') +} +// "Meeting (Sync)" Notes +else if (title.startsWith("Sync with")) { + return tp.file.include('[[Generic Meeting (Page Template)]]') +} +// "Music Lesson" Notes +else if (title.startsWith("Music Lesson")) { + return tp.file.include('[[Music Lessons — Page Template]]') +} +// "People" Notes +else if (title.startsWith("@")) { + await tp.file.move("/zettelkasten/people/" + title) + return tp.file.include('[[People (Person) — Page Template]]') +} +// "Project" Notes +else if (title.includes('(Project)')) { + return tp.file.include('[[Project (Page Template)]]') +} +// "Starter" Note +else { + return tp.file.include('[[Starter Note (Page Template)]]') +} +%> \ No newline at end of file