Automating My Daily Notes with Obsidian

ETA: 4/1/2021: I have now posted my code for my daily notes automation script on GitHub. See this post for more details.

For nearly a week now my Daily Notes file in Obsidian is generated automatically each night after midnight. I wrote a Python script that creates the note, and having the script running as a Launchd job–which these days is recommended on Mac OS over cron jobs. So far, this has been working out beautifully for me. Of course, this is in large part because Obsidian itself works so well for me.

I use my daily notes in much the same way as I used daily notes in my Bullet Journal days. Indeed, I store my daily notes in my Obsidian vault in a folder called “Bullet Journal”. In addition to having reference information right up front, I use the Today’s Notes section of my notes for jotting various notes down throughout the day, that serve as a kind of log of activity, ideas, and things to do.

The basis of the design of my Daily Note drew inspiration from this post on the Obsidian forums.

Here is a look at my annotated Daily Notes file for today, Monday, February 8.

An annotated version of a daily notes files automatically generated by my scripts.

1. Note title

My Python script generates a note title for the note in yyyy.mm.dd.www format. I used this format back when my Bullet Journal was on paper and so I’ve kept it going here.

2. Navigation/weather bar

My script generates a navigation bar to the previous day’s notes, and to tomorrow’s note (which doesn’t exist yet, of course). It also make a call to a weather app to pull in a very short version of the weather for the day for my location.

3. Agenda

Next, the script generates the “Agenda” section of my note. It does this by calling a command-line program called “icalBuddy” (for Mac OS) which allows you to grab information from your calendar. The published version of icalBuddy had an issue with accessing calendars from a cron job or launchd, but I found post where a person was provided with an updated version of the binary that fixes the problem. The only place I’ve been able to find that binary is in that post, but it worked perfectly once I replaced the original binary.

Each night, a call to icalBuddy is made and the resulting events on that day’s calendar are returned. I then render those events in the Agenda section of my Daily Note.

4. To-Do

This section lists all of the tasks I have that have not yet been checked off. This was a little tricky. The script searches for all tasks in my notes and splits them into 2 groups, completed and incomplete. It then hashes the tasks and removes any “incomplete” tasks that appear in the “completed” task list. This prevents seeing uncompleted tasks that were completed on a subsequent day. The result is that I only see tasks that I haven’t completed.

4a. Illustrates what happens when tasks are carried over day-to-day without being completed. My script appends a note indicating how long the task has been open. For instance, that “Add functionality for notes timeline” task has been open for 2 days (since Saturday).

Throughout the day, I’ll check off tasks here and add new ones and those get incorporated into the next day’s runs.

5. Reading

I try to read at least one feature article from the various magazines I subscribe to every day. This is where I record what I read. I’ve actually developed a fairly elaborate reading and book notes system in Obsidian that I will write about in a future post. What I do here is jot down the article title, author, and source in a specific format (e.g., “Article Title” by Some Authors | Source: Magazine (Month Year)) and a separate script adds this information to my Library notes.

6. Today’s notes

This is where my bullet journal-style daily notes go. These can be virtually anything that I think is noteworthy. As you can see, when I opened the paper this morning, I saw that George Shultz died, and noted that here.

I’ll put to-do items here. If I am working on a something, I’ll make notes about what i am working on. Ideas get logged here. Funny remarks I hear throughout the day might find their way here. It can be quite a mish-mash of stuff, but it ends up being a useful reference.


I suspect that some people will ask if I can share my scripts. I am happy to do that, but not quiet yet. I tend to write scripts the way I write stories, the first draft is quick and dirty and functional. The second draft is cleaned up and organized. Once I get the “second draft” written, I’ll post what I’ve written on GitHub and anyone who wants can make use of them.

Some of this functionality is built into existing Obsidian plug-ins, but it is either not automated, or not quite the way I wanted it, so the scripts that I have written are tailored to my specific needs and behaviors. It’s nice to wake up in the morning, open Obsidian, and see my daily notes file waiting for me.

9 comments

  1. This is really interesting. Currently I manually trigger a new Daily Note page with the Daily Note feature. It populates with a simpler template.

    I’m very interested to see your code when you’re ready to share it. Are you using the wttr.in integration for your weather?

    1. Paul J, yes I am using wttr.in via a Python requests call. It’s simple and pretty much what I need. I never gone back and looked at the weather for a day beyond wondering if it was hot, cold, sunny, rainy, or snowy. wttr.in works great for that.

  2. Excellent information that has given me interesting ideas. At present I generate my daily note using the built in plug and a template + a todoist plugin — The idea of automatically moving uncomplete tasks to the next day — I may well steal that.

    The calendar integration is really good — at present, I leave my schedule in the calendar but it would be useful to see in Obsidian as well.

    1. Paul, the uncomplete task-moving is not perfect. The hashing will cause problems with identically named tasks. Say, if I finish a task called “Go to store” and check it off, and then a week later, create a task called “Go to store” and leave it unfinished, my hashing mechanism will see it in the done list first, and then remove it from the unfinished list. I have an idea for a working around–appended Zettelkasten-style number to the end of a task to make it unique (and uniquely hashable) but I haven’t done that yet.

  3. Thanks so much for posting your process. I want to find a way to call completed tasks from a to-do manager like Todoist to my daily note. Your work here is the closest thing I have found so far to bullet journaling in that when you go to a daily note, you see what you did. I hate how to-do managers hide the completed tasks. However, I have way too many open to-dos at any given time to be able to have all of the open ones called into my daily note. I have found Todoist to be a great, simple, refined way to keep track of to-dos. I don’t need my to-do list in Obsidian. All I want is to be able to see the tasks I completed, in Todoist, memorialized on my daily note, because that is a form of journaling.

  4. For remaining tasks I simply use the Tasks plugin. It allows me to create a code block (in my Daily Template) with “tasks not done” showing all the not done tasks or your vault.

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.