I recently uploaded a video to YouTube
And I wanted to share the code and resources behind my Daily Note.
The Template
The core template behind my daily note uses the community plugins: Templater
and Tasks
. It also blends in some of the built in plugin Template
and Daily Note
.
---
Author: Scott Novis
tags:
- DailyNote
Version: 10
Pushups:
AirSquats:
weight:
---
# {{date:MMMM Do, YYYY}}
## {{date:dddd}}
Day of Year: <% moment(tp.file.title).format("DDD") %>
***
<%*
/* 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 prevDay = tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD");
let nextDay = tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD");
const thisWeek = moment(tp.file.title,"YYYY-MM-DD");
const startOfWeek = thisWeek.clone().startOf('isoweek');
const endOfWeek = thisWeek.clone().endOf('isoweek');
const startDateStr = startOfWeek.format("YYYY-MM-DD");
const endDateStr = endOfWeek.format("YYYY-MM-DD");
%>**Prev Date**: [[<% prevDay %>]]
**Next Date**: [[<% nextDay %>]]
***
## Quotes
>
## 📝 Notes
-
## Tasks
### Critical Now
```tasks
not done
(Scheduled <% tp.file.title %>) OR (Due <% tp.file.title %>)
Priority highest
limit 5
```
### Opportunity Now
```tasks
not done
(Scheduled between <% startDateStr %> <% endDateStr %>) OR (Due <% tp.file.title %>)
Priority high
sort by created reverse
limit 10
```
## Habits
- [ ] Daily Devotional
- [ ] Readwise Review
- [ ] Bible
- [ ] YNAB
- [ ] Meditate
- [ ] Write
- [ ] Exercise
- [ ] Walk
## Daily Story and Affirmation
daily_story::
daily_meditation::
## Completed Today
```tasks
done <% tp.file.title %>
Sort by urgency
```
## Drafts Append
Date Links
The most intense code in this template is the date math to create links for tomorrow and yesterday automagically. I use the Calendar
Plugin to create future daily notes, and weekly notes.
Tasks
The way my tasks plugin works, is that I rely on the Scheduled Date
to make a task show up in my daily note on the day I want to see it. But, sometimes things roll out of my visibility window so I also use a page called Task Sweeper
to list every unfinished task (there is a hard limit to keep this page from crashing) but it gives me a way to track down errant tasks. But it lets me put a task in a project, an area, my daily note, or anywhere really and they show up in my Daily Note, and Weekly note as well.
It might look complicated at first, (and I'm sure some guru could simplify the code), but I wanted to write it in a way that six months, or nine months later I could remember what I had done.
Enjoy.