Skip to content

Instantly share code, notes, and snippets.

@panahi
Created November 7, 2022 03:04
Show Gist options
  • Save panahi/03b139c5beec258b29936e248cc516c1 to your computer and use it in GitHub Desktop.
Save panahi/03b139c5beec258b29936e248cc516c1 to your computer and use it in GitHub Desktop.
Obsidian Templates Collection

<%* var fileDate = moment(tp.file.title); // moment dates are mutable let prevDay = moment(fileDate).subtract(1, 'd').format('YYYY-MM-DD'); let nextDay = moment(fileDate).add(1, 'd').format('YYYY-MM-DD'); let prevDayWeek = moment(fileDate).subtract(1, 'd').format('gggg-[W]ww'); let nextDayWeek = moment(fileDate).add(1, 'd').format('gggg-[W]ww'); let yearLink = fileDate.format('YYYY'); let quarterLink = fileDate.format('YYYY [Q]Q'); let monthLink = fileDate.format('YYYY-MM'); let monthLongName = fileDate.format('YYYY MMMM'); let weekLink = fileDate.format('gggg-[W]ww'); let basePath = Journal/${yearLink}; let weekPath = ${basePath}/${weekLink}; let prevDayFile; let nextDayFile; if (prevDayWeek === weekLink) { prevDayFile = ${weekPath}/${prevDay}; } else { prevDayFile = ${prevDayWeek}/${prevDay}; }

if (nextDayWeek === weekLink) {
    nextDayFile = `${weekPath}/${nextDay}`;
} else {
    nextDayFile = `${nextDayWeek}/${nextDay}`;
}
let yearReviewFile = `${basePath}/${yearLink} Review`;
let quarterReviewFile = `${basePath}/${quarterLink} Review`;
let monthReviewFile = `${basePath}/${monthLongName} Review`;
let weekReviewFile = `${weekPath}/${weekLink} Review`;

-%>

id: <% crypto.randomUUID().replace("-", "") %> aliases: <% fileDate.format("dddd MM-DD-YYYY")%> tags: daily_note <% fileDate.format("YYYYMMDD") %> <% weekLink %> <% monthLink %> <% quarterLink %> <% yearLink %> type: periodic_daily status: ๐ŸŸฅ weekday: <% fileDate.format("dddd") %> week: <% fileDate.format("ww") %> month: <% fileDate.format("MM") %> year: <% fileDate.format("YYYY") %> created: <% moment().format("YYYY-MM-DD HH:mm") %> modified: <% moment().format("YYYY-MM-DD HH:mm") %>

๐ŸŒŽ Navigation ๐ŸŒŽ

<%* // โฎโฎ โ‹ฎ 2021 โ€บ Q4 โ€บ 12 โ€บ W49 โ‹ฎ โฏโฏ // [[path/to/file|display_text]] // ๐Ÿ“†= current day // ๐Ÿ  = dashboard // Get Started With Obsidian Periodic Notes and Templater | Kevin Quinn let navStr = [[${prevDayFile}|โฎโฎ]] โ‹ฎ [[${yearReviewFile}|${yearLink}]] โ€บ [[${quarterReviewFile}|${fileDate.format('[Q]Q')}]] โ€บ [[${monthReviewFile}|${fileDate.format('MM')}]] โ€บ [[${weekReviewFile}|${fileDate.format('[W]ww')}]] โ‹ฎ [[${nextDayFile}|โฏโฏ]]; tR += navStr %> || ๐Ÿ“† Today || [[03.01 Dashboard|๐Ÿ  Home]]

![[03.02 Navigation|full no-title nlk]]

โ„น Information

  • Summary::

๐Ÿ“… Agenda

name Import Agenda
type command
action Shortcut Launcher: Import Agenda
color purple

^button-import-agenda-btn

๐Ÿš€ Tasks

const { TaskViews } = customJS;
let dateString = '<% tp.file.title %>';
TaskViews.buildDailyOverview(app, dv, this, dateString)

โœ๏ธ Log

id type aliases status
<% crypto.randomUUID().replace("-", "") %>
๐ŸŸฅ
id aliases tags type status created modified
3ef3ea1bc276-4261-aacc-355a83389d01
๐ŸŸฅ
2022-07-26 21:12
2022-09-08 21:40
name Log โœ๏ธ
type command
action QuickAdd: Log Something
color purple

^button-logsomethinginline

name Task โœ…
type command
action QuickAdd: Log Task
color purple

^button-logtaskinline

name Reco โญ๏ธ
type command
action QuickAdd: Log Recommendation
color purple

^button-logrecommendationinline

name Timer โฐ
type command
action QuickAdd: Start Timer
color purple

^button-starttimer

name File Bookmark ๐Ÿ“‚
type command
action QuickAdd: File Bookmark
color purple

^button-filebookmark

name Sync Bookmark ๐Ÿ”„
type command
action Obsidian Bookmark Manager: Sync Bookmark (Devonthink)
color purple

^button-syncbookmark

name Verify โœ…
type command
action Obsidian Bookmark Manager: Verify Bookmark Archive
color purple

^button-verifybookmark

Error in user YAML: (<unknown>): could not find expected ':' while scanning a simple key at line 2 column 1
---
id: <% crypto.randomUUID().replace("-", "") %>
<%*
var fileDate = moment(tp.file.title.substring(0, 10));
if (!fileDate.isValid()) {
    fileDate = tp.date.now();
}
// moment dates are mutable
let yearLink = fileDate.format('YYYY');
let quarterLink = fileDate.format('YYYY-[Q]Q');
let monthLink = fileDate.format('YYYY-MM');
let weekLink = fileDate.format('gggg-[W]ww');
let fileNameFormat = fileDate.format('YYYY-MM-DD');
-%>
tags: meeting <% fileDate.format("YYYYMMDD") %> <% weekLink %> <% monthLink %> <% quarterLink %> <% yearLink %>
type: meeting
status: ๐ŸŸฅ
---

โ„น๏ธ Information

  • Date:: [[<% fileNameFormat %>]]
  • Attendees::
  • Projects::
  • RecordingLink::
  • Summary::

๐Ÿ“… Agenda

๐ŸŽฏ Goals

๐Ÿ“ Discussion notes

๐Ÿš€ Action items

<% tp.user.fileMeetingNote(tp, yearLink, weekLink, tp.file.title) %>

obsidianUIMode
preview

| Day | Week | Month | Quarter | Year |

button-logsomethinginline button-logtaskinline button-logrecommendationinline

[[03.04 Tasks to Reschedule]] [[03.05 Tasks Needing Review]]

<%* let dateString = tp.file.title.substring(0, 8); var fileDate = dateString.split('-'); let year = fileDate[0]; let weekNum = fileDate[1]; let weekDate = moment(dateString, 'gggg-[W]ww'); let prevWeek = weekDate.clone().subtract(1, 'w').format('gggg-[W]ww'); let nextWeek = weekDate.clone().add(1, 'w').format('gggg-[W]ww'); let yearLink = weekDate.format('YYYY'); let quarterLink = weekDate.format('YYYY-[Q]Q'); let monthLink = weekDate.format('YYYY-MM'); -%>

id: <% crypto.randomUUID().replace("-", "") %> aliases: <% dateString %>, <% weekDate.startOf('week').format("[Week of] YYYY-MM-DD") %> tags: weekly_note <% dateString %> <% monthLink %> <% quarterLink %> <% yearLink %> type: periodic_weekly status: ๐ŸŸฅ week: <% weekDate.format("ww") %> month: <% weekDate.format("MM") %> year: <% weekDate.format("YYYY") %> created: <% moment().format("YYYY-MM-DD HH:mm") %> modified: <% moment().format("YYYY-MM-DD HH:mm") %>

Objectives

Reflection

  • Summary::

What happened this week?

table without id ("[["+file.name+"|"+aliases+"]]") as "Day", Summary as "Summary" 
from "" 
where type = "periodic_daily" 
and week = <% weekNum %> 
and year = <% year %> 
sort file.name asc

Tasks

const views = customJS.TaskViews;
const weekNum = '<% dateString %>';
views.buildWeeklyOverview(app, dv, this, weekNum);
id aliases tags type status
<% crypto.randomUUID().replace("-", "") %>
system
๐ŸŸฅ

Metadata

  • CurrentOwner::
  • JiraProject::
  • Repository::
  • PointsOfContact::
  • SystemType::
  • IsActive::

Analysis/Summary

What does this system do?

Which domains does it have affinity with?

Notes

Readme Notes

Interface

Data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment