DEV Community

Cover image for Structured daily/weekly notes - in Obsidian
Michal Bryxí
Michal Bryxí

Posted on • Updated on

Structured daily/weekly notes - in Obsidian

Earlier this week I've been reading a brilliant post Writing Down What I Do — In Obsidian from Chris Krycho and somehow found myself in a rabbit hole trying to automate some aspects of this approach.


The why

When I'm building a system for myself, I need to make sure that I'm:

  • Happy with the idea of how it will look like in the future
  • Making it as little chore as possible for myself

Because of these I took the original concept and made it a little bit more "mine".

The how

The core of the functionality here is revolving around three community plugins: Templater, Periodic Notes (which itself requires Natural Language Dates), Calendar and Tasks.

Templater config

  • First create a folder in your vault called /Templater.
  • Then create file /Templater/Daily.md with following content:
---
date: <% tp.date.now("YYYY-MM-DD", 0, tp.file.title, "YYYY-MM-DD") %>
week: <% tp.date.now("YYYY-[W]W", 0, tp.file.title, "YYYY-MM-DD") %>
year: <% tp.date.now("YYYY", 0, tp.file.title, "YYYY-MM-DD") %>
---

#### Work
- [ ] 💪

#### Meetings
- 🎙

#### Outcomes
1. 🦄
Enter fullscreen mode Exit fullscreen mode
  • Next create file /Templater/Weekly.md with following content:
---
week: <% tp.date.now("YYYY-[W]W", 0, tp.file.title, "YYYY-[W]W") %>
year: <% tp.date.now("YYYY", 0, tp.file.title, "YYYY-[W]W") %>
---

## Notes
- 🚂

## History

<%*
Array.from(Array(7).keys()).map((i) => {
  date = tp.date.weekday("YYYY-MM-DD", i, tp.file.title, "YYYY-[W]W");
  tR += `### ${date}\n`;
  tR += `![[Tracking/Daily/${date}#Outcomes]]\n\n`;
});
%>
## Outcomes
1. 🪂
Enter fullscreen mode Exit fullscreen mode
  • Change following plugin configurations:
    • Templater folder location: Templater
    • Trigger Templater on new file creation: on

Periodic notes config

  • Create following two folders:
    • /Tracking/Daily
    • /Tracking/Weekly
  • Change following plugin settings:
    • Daily Note Template: Templater/Daily.md
    • Daily Notes - Note Folder: Tracking/Daily
    • Weekly Note Template: Templater/Weekly.md
    • Daily Notes - Note Folder: Tracking/Weekly

Calendar config

  • Change following plugin settings:
    • Show week number: on

See it in action

  • If you don't have right sidebar open, then press cmd+p and select Toggle right sidebar.
  • Press cmd+p and select Calendar: open view.
  • In the top of the right panel a new calendar icon appeared. When you click it, you should see following:

Periodic notes calendar widget

Now when you click on individual days you should be asked if you want to create new note and if you confirm new note is created with expanded template placeholders:

Daily note

And when you click on a week number again a new note will appear with the weekly template fields expanded. Note the "History" section which contains embeds of the outcomes of all daily notes in given week:

Weekly note

Conclusion

With a little bit of scripting/templating one can create a pretty automated system for organized note taking that provides block embedding of the relevant notes.


Photo by Raphael Wild on Unsplash

Top comments (1)

Collapse
 
schemetastic profile image
Schemetastic (Rodrigo)

Wow I didn't knew it was possible to do templating or scripting like that in Obsidian! Very cool!