I’ve started using Obsidian to organise my notes. For a few years now, while I’ve been building up my career as a beer writer, I’ve gathered all sorts of research: I’ve clipped web pages, marked extracts in books, transcribed hours upon hours of interviews with fascinating people, filled books with tasting notes…
I’ve used it to write my articles, and then… nothing. I’ve just filed it away. And I couldn’t escape the nagging feeling that if this material were better organised I’d get more out of it. What I wanted was some way to see it all together, and to form connections between the various bits. Then I could reuse all this stuff, that I’d spent so much time and effort to gather, to create new things.
Well… yes. Obsidian lets you do just that. Hooray. But I’m not here to write about that today. (I’ll link a video at the bottom if you want to learn more.) Instead I’m just going to focus on a small thing I’ve put together that helps me to get notes into the platform easily, wherever I am.
One important thing to note: Obsidian isn’t cloud based. It works with local files. There’s no mobile app.
The basic idea
I use an app called Hazel to watch a particular folder in my Dropbox. Whenever I drop a text file in there, it performs these simple actions:
- It calls on a Python script to rename the file and convert it from plain text to markdown.
- It adds a tag to the end of the file and moves it into my Obsidian vault.
And that’s it! Dead easy. I can share plain text notes from apps like Google Keep on my phone into Dropbox, and when I’m next at my computer that idea is already waiting for me in Obsidian.
It’s certainly better than telling myself I’ll remember my idea later, because I invariably won’t!
The Python file
This is pretty simple stuff. I wrote it in about 36 lines of code. Clever people could no doubt make it even shorter. But whatevs, here’s how I did it.
Dealing with sys args
Hazel uses the shell to call this script and passes two arguments. So first things first, let’s deal with those. The first argument is the path to the file we want the script to work its magic upon. The second is an optional flag,