Electronic Notebook Revisit: TiddlyWiki, meet Git

This past week, I got my SMU-provided desktop PC. The first thing I did was to install VirtualBox and then install a virtual Ubuntu 9.04 system inside VirtualBox. The default desktop installation was Scientific Linux 5. While this is an excellent platform for research, it’s terrible for the  desktop. This machine will be my primary means of desktop work – writing, graphical editing, handling documents. SL5 sucks for this work. Ubuntu rules.

As soon as I got the system setup, I realized I wanted a way to edit my electronic logbook seamlessly between my laptop, the desktop, and any other machine. A while back, I mentioned a few e-logbook models I had tried [1]. I settled on TiddlyWiki for several reasons. It has journal entry built right into it. It allows new “tiddlers” to be created and linked to journal entries; for instance, a tiddler about a specific to-do item. It’s also a plain-text HTML file incorporating javascript code, which means it can be hand-edited and (more importantly) managed using something like CVS.

The challenge with TiddlyWiki is that I can’t find a reliable way to host the wiki through a central server. Doing so would allow me to edit the wiki from any machine with a web browser, asynchronously. There are external websites that will host your wiki, but the point of a logbook is to have it under my control. I decided instead to manage the logbook with Git.

Git is a software collaboration system used to manage the Linux Kernel. It feels similar to CVS, but is supposed to provide much better control over patching, branching, and other collaborative software development needs. I chose it because (a) I have never used it before and (b) if it’s good enough for Linus Torvalds, it’s good enough for me.

I copied my existing logbook directory (Notebooks/) to my home server. I then initialized the directory tree as a git repository (“git init”). I then added all existing files to the repository (“git add .”, followed by “git commit”). Now I had a central copy of the logbook capable of being pushed out to my laptop or desktop.

Let me pause to discuss how I structure and manage my logbook. I have a top-level directory called “Notebooks/”. I decided to keep one logbook for all my projects, rather than one per project. I can then tag tiddler journal entries with names like “babar” or “atlas” to know whether they are relevant to different projects, and search by tag. This was better than having lots of directories.

I did choose to keep one separate logbook per year. This is similar to what I did when I kept a paper logbook. I have a subdirectory called “Notebooks/2009”. I then had to make one more decision: how to handle media. I decided to keep subdirectories that are “MONTH/DAY” for media. For instance, if I need to put an image of a chart in my logbook on 09/01, I make the subdirectory “Notebooks/2009/09/01/” and put the image there. I then link to it in my  TiddlyWiki, and the image appears in my logbook. This may be hyper-organizational, but it allows two things. First, it relieves me of the conflict of similarly named files. If I have two graphs from the same source, one a revision of the previous, then I don’t have to name them differently (assuming the change happens over longer than a day). Second, it lets me associate date with result, and I can really think back by time index in my head to find something.

Finally, I like to have my default TiddlyWiki view (the “DefaultTiddlers” tiddler) be “[tag[journal]] [sort[-created]]”. This puts the journal entries on the inital load of the logbook, in order of date  from newest to oldest. This is more like a real logbook. When you open it, the most recent entries are closest to where the current entry is added.

Back to Git. Now, I can create the Git repository on my desktop or laptop for the Notebooks and pull the central copy to the desktop machine. I can then edit and push changes back to the server, to be picked up by my laptop. So far, I find this more than sufficient for my editing needs. We’ll see how this goes when I am on the road.

This is my current model of managing a logbook. I’m a pragmatist at heart. If this is clunky or cumbersome in the future, I’ll find a new model.

Useful links:

TiddlyWiki homepage
Git Homepage
Everyday Git Commands

[1] http://steve.cooleysekula.net/goingupalleys/2009/03/26/electronic-logbooks/

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *