This entry is about a tool called Saga,

:: Chronological tracking

You work on many projects over many years. It would be easy to lose data in a
fog of lost disks and subdirectories. Saga allows you to keep track of your
data over a career of work.

I think about data chronologically. I might forget the name I gave a project,
but will remember that I was working on it in August around the same time as
another project that I do remember.

The code length of saga is shorter than the text of this post.

:: Usage

Saga creates directories which are named so that when you sort them all you
get them back in chronological order.

Basic usage:

$ # default usage echos the complete list of files
$ saga
$ # this creates a new directory and echo the filename
$ saga sample
$ # echos the name of the most recently created dir
$ saga -z
$ # dash z makes it easy to change to the most recent dir
$ cd `saga -z` 
$ pwd

Browsing the filesystem from the console, so we can see those structures,

$ cd $HOME/saga
$ cd saga
$ ls -lF

Note use of the aa, ab and ac tokens where multiple directories are created on
one day. If we create several entries on the same day, these tokens retain
chronological order.

It is good to have the date, username and host encoded into the directory.
Imagine you are looking through your records in five or ten years time. You
can know exactly the circumstances in which the entry was raised.

You may have copied the directories between several computers in that time.
All the unix times will have changed. But the directory is named to give you
good context.

:: Searching


$ saga | grep python
$ cd 20111031.cturner.bump.aa.twisted.standardio.insults
$ ls
$ cat
# start with twistd -noy
import os, tty, sys, termios

from twisted.application import service

:: Links keep track of frequently-used directories

You will find that you use some saga directories regularly, and do not want
to type in the full name regularly.

Create a directory, /home/username/l.

L is short for 'link'.

Make symbolic links from ~/l to you favourite saga directories.

This creates a clean home directory,

$ cd $HOME
$ ls -1

:: Backups

It is easy to keep backups for this system. Get two large usb disks and a fire
bucket. Put the fire bucket in your garage. Create an encrypted partition on
each of the usb disks. Keep one disk in the machine. Use cron to rsync your
saga structure to it once a day. Switch this disk to the fire bucket once a

:: Close

I created this system originally because on any given day I would deal with
data from multiple customers and wanted to have perfect retention with a
responsive system. No web bug tracking system could match this for speed.

Since writing Saga, a commercial tool has emerged that serves a similar
purpose, Evernote. Saga is far simpler. With tools like Evernote, I worry what
happens when I need to access data, and find they have gone out of business.

Since creating it, I have also found it useful for capturing code snippets,
and pretty much everything else in my life also.

Here is the tool: