Luke Hagan

Switching from Notational Velocity to Justnotes

A quick shell script to save some time renaming your notes.

Thanks to Ben Brooks for pointing out Justnotes, a great alternative to Notational Velocity/nvALT. While Notational Velocity worked fine for me, I never liked the UI. I think Ben sums it up best in his review:

I like Justnotes because the search bar is not an omnibar that also creates new notes. Creating a new note and searching are two different actions — that fits with my mental model of how a notes app should work. I much prefer this idea and thus Justnotes. The overall UI of the app is simple, clean, and OS X. It’s great.

The trick to switching from Notational Velocity to Justnotes, however, is that they deal with note titles differently. NV displays the note’s filename as the title the notes list. Justnotes uses the first line in the note as the title.[1] So if you point Justnotes at your NV folder, your notes will be missing their titles.

To fix this, I threw together a quick bash script. Just run it in your notes folder and each note will have its filename (less extension) inserted as the first line. Remember to back up your notes before running the script!

ls *.txt | while read FILE;
    do echo -e "$FILE\n" | sed 's/\(.*\)\.txt/\1/' | cat - "$FILE" > /tmp/out;
    mv /tmp/out "$FILE";

  1. Thankfully, for Justnotes 1.1, the filename is now the same as the note title (instead of a long string of nonsense).