This entry is about a tool called Saga,

:: Chronological tracking

When you work on lots of projects, it is easy to lose data into a fog of

I generally 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.

You may have heard of Evernote. Saga serves a similar purpose to Evernote. But
it is way simpler. With tools like Evernote, I worry what happens when I need
to access data, and find they have gone out of business.

There are no such problems with Saga. Below I will describe a tool for
accessing it. The amount of code involved is shorter than the length of this

:: Usage

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

Basic usage:

$ saga         # default usage echos the complete list of files
$ saga sample  # this creates a new directory and echo the filename
$ saga -z      # echos the name of the most recently created dir
$ cd `saga -z` # dash z is useful for cd
$ pwd

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

$ cd $HOME/saga
$ cd saga
$ ls -lF
drwxr-xr-x  2 cturner cturner    4096 2011-10-31 17:21 20111031.cturner.bump.aa.python.twisted.standardio.insults/
drwxr-xr-x  2 cturner cturner    4096 2011-11-08 07:08 20111108.cturner.bump.aa.freepascal/
drwxr-xr-x  2 cturner cturner    4096 2011-12-05 22:39 20111205.cturner.bump.aa.curses.client/
drwxr-xr-x  4 cturner cturner    4096 2011-12-21 13:45 20111221.cturner.bump.aa.golang/
drwxr-xr-x  5 cturner cturner    4096 2011-12-26 15:18 20111226.cturner.bump.aa.roguelike.messaround/
drwxr-xr-x  3 cturner cturner    4096 2011-12-30 17:23 20111230.cturner.bump.aa.moria/

Note that we use tokens like 'aa' and 'ab'. If we create several entries on
the same day, we can still 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 be wrong. But the directory is named to give you
good context.

:: Searching


$ saga | grep python
$ ls
$ cat
# start with twistd -noy
import os, tty, sys, termios

from twisted.application import service

:: Use links to keep track of frequently-used directories

If you had to navigate into saga all the time, you would find yourself doing
a lot of typing.

There is a simple solution to this.

Create a directory, /home/your_name/l.

L is short for 'link'.

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

:: 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 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: