Announcement: RedBook v0.2.0 released

“Release Early, Release Often”

— Eric S. Raymond, The Cathedral and the Bazaar

In other words, time for another (early) release of RedBook. There are quite a few new features which are worth examining, in particular:

Regexp search for messages

This was actually already available before, just if you inputted a search string which was not a regexp, you'd get an unhandled exception (more or less). This exception is now handled propertly so you get a pretty message instead, if an error occurs when parsing the search string.

Log Backup

A new :backup keyword is available to quickly backup your log file. Here's what it does:

  • Loads all messages silently
  • Writes them to a file in the same directory as the original log file named <log-alias>.bkp.yml.

Handy, especially if there was a similar keyword to restore the last backup, which is planned for later on.

Support for multiple log files

This is perhaps the most important feature introduced by this release. It is now possible to configure more than one log file by adding any number of :data_<alias>: settings inside your config.yml file, where alias is the name of your log file. So, for example, if your config.yml file contains the following:

:data_test: “testlog.yml”

You can load the “test” log by typing

:use test

(:use is a shorthand for :load_log). Similarly, another new keyword :dest has been introduced to be able to log a message to a different log file without loading it into memory, like this:

:log This message will be saved to testlog.yml :dest test

Finally, a :refresh keyword has been introduced as an alias to reloading the current log.

(Almost) automatic log of completed activities

Right when I was coding the :timecalc operation, I thought it would be nice to be able to log the start and end of a task without having to type it twice. Now this is possible using the :complete keyword:

:log Testing feature X in product Y

:complete

:complete will re-log the last message prepended with [COMPLETED]:

4 Mon Oct 08 2007 – 10:47:45 AM Testing feature X in product Y 5 Mon Oct 08 2007 – 10:54:31 AM [COMPLETED] Testing feature X in product Y

What if I start another task before completing the first one? No problem, it is sufficient to load the last activities using a :load command and then issuing :complete <number> where <number> is the index of the loaded activity.
This nifty little feature will become more and more important when (starting from release 0.4) I'll implement more time tracking functions, and it will be possible to track completed tasks in a specific timeframe and/or marked with a specific tag.

Easy integration with launchers like Launchy and QuickSilver

To conclude, as someone pointed out that it would be cool to use RedBook from launchers like Launchy or Quicksilver, I made another standalone script (redbooklet.rb or redbooklet.exe) which is just able to parse a log command and write a message to the specified log file.
To use it with Launchy, for example, all you have to do is the following:

  1. Create a shortcut to redbooklet.exe (or to a way to execute the corresponding ruby script) named “log”.
  2. Copy the “log” shortcut anywhere in your start menu
  3. Bring up launchy (ALT+SPACE) and type in “log”
  4. Hit tab
  5. Type in your log message, optionally with the any :tags or :dest keywords.
  6. The message will be logged to your default log file or to the log you specified using the :dest keyword. If an error occurs, it will appear in a command line window for 15 seconds before the program is closed.

That's all folks! As usual, if you have any comment or suggestion feel free to reply to this post or email me. For a list of the planned features and releases, check out the Milestones page.

DOWNLOAD HERE