After discovering todo.txt, I realized that I needed something similar for notes. About a year ago I started working on a similar tool that would enable me to write
n a Cookie recipe
which would open up an editor where I could start writing down the fantastic cookie recipe I had in my head. I’m really no good at cookie recipes, but I tend to want to type down ideas or notes quickly when they are fresh in my mind. Opening up a text-document, saving it somewhere and typing away is usually no problem, but finding these spread out text files later is much more tedious.
So I figured I needed a way to organize this. There are several GUI apps that do this, but I really like the availability of the terminal. todo.txt really showed me how much more efficiently I managed to store and maintain my TODOs, and I wanted to do the same with my notes. This is where notes.txt comes in.
n a Cookie recipe
in a terminal, vim pops up at the end of a file named 2012-10-30.mkd (the current date) with the cursor ready at a point below a ready-made title:
Opening up an old topic
The next important step is to make it easy to find this cookie recipe at a later point. First I thought file names would do the trick, but I figured that making it easy to search for titles would be way better. If I now type
n e Cookie_recipe
in a terminal, the same document shows up with the cursor placed on the title:
This is of course also works with tab completion, so that if I type
n e Cookie
I may just press Tab to complete Cookie to Cookie_recipe.
If I want to list all my topics, I simply write
and a list of all topics show up.
If I remember that I wrote something about sugar, but don’t know in which note, I may type
n ls sugar
and note.txt will print out all topics where the word sugar is found somewhere in the text below:
As you see, the titles are listed as Cookie_recipe/Ingredients and Cookie_recipe/Recipe, allowing for you to access subtitles through
n e Cookie_recipe/Ingredients
If there are multiple instances of the same title, let’s say that we have two titles named Cookie_recipe, notes.txt will prompt you to select which topic you would like to open:
The current state of affairs
The application is not quite release-ready yet, but I’m hoping to make an Ubuntu package in a short-term future. In the meantime, you may find the source code for this at my Github account.