It’s time for a new beta release of RedBook. This was actually going to be a fairly modest release in terms of features, but I actually ended up implementing a lot more than expected, even things which were planned for the first production release 1.0. So, let’s see what’s new
New operation names (which break compatibility with previous versions)
I had a look at the names I choose for the operations and I noticed that they were either not intuitive enough or too verbose. So I decided to change a fair few of them (thus breaking compatibility with previous versions, but after all that’s what beta releases are for, right?):
New Manual/Home Page
Removed Win32::Console Library
OK this is not good news for people (like me) who use RedBook on Windows, but I promise you’ll forgive me when you read about the other new features below. I discovered by chance that the Win32::Console library (which was used to get colors working on Windows) seems not to handle international characters properly and also seems to be conflicting in some way with the Readline library I decided to include (see below). I don’t know whether this is a problem of the actual library or just of the gem used to pack it.
config.yml file has been renamed to
rbconfig.yml. Additionally, if you place a file with this name in your $HOME directory it will override the one in your RedBook folder (This was done in preparation for the RedBook RubyGem).
The following new operations are available:
- :relog — Re-logs a previously-logged message (keeping the same tags and updating the timestamp)
- :clear — Clears the screen.
- :ruby — Evaluates arbitrary Ruby code outputting the result (use with care…)
Some Mac users originally complained that the backspace key wasn’t working in RedBook (and it didn’t in Linux either). Fortunately the solution to this was easy enough: include the GNU Readline library.
Readline is now being used in RedBook to:
- Provide basic (Emacs-style) bindings
- Auto-completion for keywords and tags
- Allow the user to automatically customize key bindings via an .inputrc file placed in their $HOME directory (on Windows you’ll have to define a HOME environment variable pointing to a directory of your choice). An example .inputrc file is distributed with RedBook with some specific key bindings.
Support for international characters
Finally, I decided to implement another feature which was originally planned for the 1.0 release: international characters support. This is possible using the Iconv Ruby extension (requires GNU libiconv) which can convert strings between different character sets. The character sets needs to be configured via the rbconfig.yml file.
For more information, check out the ChangeLog