all repos — h3rald @ 6ed04d62656d222df819ecfd406a5afb3166d316

The sources of https://h3rald.com

content/articles/redbook-020-released.textile

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
----- 
permalink: redbook-020-released
filters_pre: 
- redcloth
title: "Announcement: RedBook v0.2.0 released"
comments: []

date: 2007-10-08 05:05:00 +02:00
tags: 
- redbook
- ruby
- productivity
- opensource
type: article
toc: true
-----
<blockquote>
_"Release Early, Release Often"_

			-- Eric S. Raymond, "The Cathedral and the Bazaar":http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s04.html
</blockquote>

In other words, time for another (early) release of "RedBook":http://www.assembla.com/space/redbook. There are quite a few new features which are worth examining, in particular:

h3. 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.


h3. Log Backup

A new *&#58;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 &lt;log-alias&gt;.bkp.yml.

Handy, especially if there was a similar keyword to restore the last backup, which is planned for "later on":http://www.assembla.com/spaces/milestones/index/bWE7NkzCqr3k25abIlDkbG?spaces_tool_id=ceS8UazCqr3k25abIlDkbG.


h3. 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 *&#58;data_&lt;alias&gt;&#58;* 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:

*&#58;data_test&#58; "testlog.yml"*

You can load the "test" log by typing

*&#58;use test*

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

*&#58;log This message will be saved to testlog.yml &#58;dest test*

Finally, a *&#58;refresh* keyword has been introduced as an alias to reloading the current log.


h3. (Almost) automatic log of completed activities

Right when I was coding the *&#58;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 *&#58;complete* keyword:

&#58;log Testing feature X in product Y

&#58;complete

*&#58;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 *&#58;load* command and then issuing *&#58;complete &lt;number&gt;* where &lt;number&gt; 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.


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

# Create a shortcut to redbooklet.exe (or to a way to execute the corresponding ruby script) named "log".
# Copy the "log" shortcut anywhere in your start menu
# Bring up launchy (ALT+SPACE) and type in "log"
# Hit tab
# Type in your log message, optionally with the any &#58;tags or &#58;dest keywords.
# The message will be logged to your default log file or to the log you specified using the &#58;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":http://www.assembla.com/spaces/milestones/index/bWE7NkzCqr3k25abIlDkbG?spaces_tool_id=ceS8UazCqr3k25abIlDkbG page.

p=. *"DOWNLOAD HERE":http://www.assembla.com/spaces/files/bWE7NkzCqr3k25abIlDkbG*