After reading Steve Ivy's blog post yesterday about how he hooked his Notational Velocity notes with his Github wiki, I was inspired to do the same with Python.
Install the Python libraries specified in the requirements file with pip:
sudo pip install -r requirements.txt
Then grab the Growl SDK from Growl's homepage and install the Python module.
One thing you will need to do to get GitPython working as a service is to edit where the Git binary is located. Run which git
to find where it is. Then, in cmd.py
(for me, it's located at /Library/Python/2.6/site-packages/git/cmd.py
), change
call = ["git", dashify(method)]
to
call = ["/where/your/binary/lives/git", dashify(method)]
Store your Notational Velocity notes as plain text files and move the directory to something like ~/Documents/Notes
. Add the included .gitignore
.
git init
git add .
git commit -m "first commit"
Next thing you should do is add a remote. Set up a bare repo in your Dropbox or whatever you want to use to sync up your repos between computers. E.g.
cd ~/Dropbox/Documents
mkdir Notes.git
cd Notes.git
git init --bare
Now go back to ~/Documents/Notes
and set this repo as your origin.
cd ~/Documents/Notes
git remote add origin ~/Dropbox/Documents/Notes.git
git push origin master
Move nvwatcher.py
to /usr/local/bin
. Change the path
variable on line 10 to point to your ~/Documents/Notes
location (must be an absolute path). Download the Notational Velocity icon file to get a pretty image for each Growl message. Then make the file executable with
chmod +x nvwatcher.py
Move me.dlo.nvwatcher.plist
to ~/Library/LaunchAgents/
and run
sudo launchctl load ~/Library/LaunchAgents/me.dlo.nvwatcher.plist
Now you're done! When you use Notational Velocity, you will see a Growl message for each note change you make.