Justin Li

Journal History and Tools

2008-12-12

When I first started writing in my personal journal (not to be confused with this blog), it wasn't because I want to keep track of what I've done or been through. It was because I wanted to write a journaling program, and needed entries to test said program. I believe at the time I hit a limitation where Java could only read 1024 characters at a time. I'm pretty certain that's not true now, but as I wasn't as good a programmer then, I gave up on the project.

My "test data" lived on, however, and came to be my journal.

In the 6.5 years I've written in my journal, it has gone through several formats. I don't remember what it was when I first started, but around 2005 I turned my journal in HTML pages. I reasoned that I wanted to be able to access this from anywhere, and as long as I have a browser available I can read and search it.

In the next few years I became increasingly uncomfortable with putting P and BR tags in front of my writing. So this past July, I finally broke down, removed all the HTML code, and turned it to text, plain (pun intended) and simple.

To help with my searching of the journal, I have written a bash script. Here's the help:

Usage: journal OPERATION [OPTIONS] [ARGS...]    -A archive to a datetimed tarball    -C count the number of entries    -D DATES ...        find entries by date    -F[cin]        term frequency        -c capitalized words only        -i ignore case        -n proper nouns only    -S[i][cd][r DATE DATE] TERMS ...        search entries for TERMS        -c only display number of results        -d only display date of results        -i ignore ignore case        -r YYYY[-MM[-DD]] YYYY[-MM[-DD]] resuls must be in given date range    -T generate tags file    -W wordcount of journal    -h show this help and quit

As you can see, this script does a number of things. Let me explain each operation.

I actually use this script a lot, whenever I'm looking up things I've previously written.  There are a few things I want to try though: