← Back to All Blog Posts
Posted: 5/18/2025

Daily Journal Changes

Since the last time that I wrote about my daily journal in Obsidian, I have made some changes to it.

Renaming Every File

I finally went through the process of renaming every single file so that it corresponds with the day that the file is for instead of a count of how many days the daily journal has gone on for. So, instead of seeing a list of numbers when I look at a file, I actually see a date which is much more useful.

This was an annoying process to go through, but not in the ways that I expected.

Each filename was a number representing the day of the journal (1st day, 50th day, 100th day, etc.). Essentially, I wanted to create a mapping from each filename to a date which would become the new filename.

I have more than 2000 files to rename, so I made a script in python that looked at all of the files.

My process was to identify files that have a known date with certainty. For example, if I mention certain holidays, then regardless of any of the existing metadata, I know what day the file corresponds to.

I then use these files as anchor points and extrapolate the date based on the date of the nearest anchor points. For example, if I identify Christmas day with the filename x, I know the date for the file x - 1, x - 2 and so on. I would also know the dates for x + 1, x + 2 and so on.

Each unknown file has two extrapolated dates: the date extrapolated from an anchor point in the future, and the date extrapolated from an anchor point from the past. If these two dates don't agree, then I know that there is an error, and I can tell where the error is by finding the threshold of where things are correct and where things are wrong.

The more anchor points I have, the more confident I can be that this mapping is correct.

I can't rely on file metadata, because my computer may change that without me knowing, especially since I've moved and copied the files and migrated from two other note taking apps before Obsidian.

However, each file did have its creation date stored in the text itself as frontmatter, meaning that it's been preserved all this time. Sometimes, the creation date is past 12 midnight, so the day was one off, but that was easy to find and correct.

With both the extrapolated data and the creation date, I could be pretty confident that the mapping is correct, even if one of those sources of information wasn't correct sometimes. I probably could have gotten away with only looking at the frontmatter, but I dunno it was fun.

Afterwards, I had to find a way to actually rename the files.

The main consideration is making sure you don't disconnect backlinks. When you rename a file in Obsidian, it knows to search for any relevant backlinks and update them as well. It's not impossible to do that with some script (it is all text, after all) but any external system has to keep this in mind.

For this, I used obsidian-cli. I made the python script generate a shell script with a series of commands that would rename every single file.

Honestly, I feel like I was doing something slightly incorrectly because running the script took ages. It took multiple seconds per renaming operation which amounted to a long time renaming.

But, the renaming is done and I'm pretty confident that it's correct, and all 2000+ files were renamed.

Journaling Habits

I used to journal at the end of each day. I liked having a routine of reflecting upon the day.

What it turned into was adding 30+ minutes onto my nightly routine which made me sleep later than I wanted to. I also was never going to end up remembering everything that I wanted to write down.

So, I just started journaling throughout the day. I write down the time (I have a shortcut in Obsidian) and write little snippets of what I'm focusing on and maybe some random thoughts that I have. It's good to get those out of my head so that they don't rattle around forever.

I end up writing better because I'm not tired at the end of the day, and I enjoy noting down things that I've been reading or watching or listening to.

Overall, huge success.