(replace blogname with your blog name, and N with the number of posts - or a really large number, say 10000).

While the second option seems to be more useful for machine consumption and has the benefit of saving the comments too, it does not provide a full backup - at least for this blog. I can't get all the posts from that URL. According to the readers' comments to the Google OS post, this seems to be a problem for others too.

convinced me that this method needs some tweaking: HTTrack followed every link on the blog, saving the same files with different names over and over again. I stopped the mirroring process after more than 100 megabytes of data were downloaded...

After some more experimentation, I decided to start the mirroring process at the link provided in the first backup tip from Google OS, together with some filtering (I also disable HTTrack's animated progress messages, so that I can run this from a cron job):

This way I backup one page with all the posts, and one page per each post and its associated comments. This is good enough, as I don't really care about restoring the blog - I just want the contents saved.

Friday, January 23, 2009

I've said it before: freedom has its price. I use an unconventional Window Manager (WM) - awesome, and the price I pay for this choice is that I need, on occasion, to reinvent some wheels. Today's wheel is that innocent looking clock on the status bar (or panel, or taskbar, or whatever you call it).

The awesome (v2.3) status bar resides, by default, at the top of the screen, and it shows the list of tags, tiling mode, list of windows and the awesome logo.

One feature that's lacking from the statusbar, that I really need, is for the statusbar to display both the clock (date and time) and the load average. There are three steps to this:

add the appropriate text fields to the awesome statusbar, by adding the following lines in the statusbar section in ~/.awesomerc (search for the string "mystatusbar" and put the following before the closing curly bracket):

Friday, January 16, 2009

Text files that contain tab characters can be really annoying for programmers when switching editors or development environments. A tab character is displayed as several spaces, and the problem is that different editors have a different idea as to the number of spaces to substitute for each tab. This fact can, and does, mess up the indentation of source code.

As an emacs user (read: junkie) I always disable the "Indent Tabs Mode", to prevent indentation from inserting tabs into the code:

If you can't stand the fact that the code you're working with has tabs in it, and you don't mind causing all sorts of merge problems for your fellow developers, you can use the expand utility to expand the tabs, and replace them with spaces:

Friday, January 2, 2009

After more than 2900 downloads of UnDBX v0.11, the only feedback I got was one 4-star review at download.com and a thank-you email from a fellow who used UnDBX to rescue messages from bad DBX files.

Frankly, this is more than I expected, and it's really cool.

I wasn't going to release another version, because I'm quite happy with it as is. The reviewer I mentioned would've been happier if UnDBX had a Graphical User Interface, but I was never keen on providing one (I have more to say about it below).

The trigger for this release is the fact that v0.11 can't be compiled on Window$ as is. I wrote a very basic Makefile that allowed me to cross-build v0.11 for Window$ on my Debian/GNU Linux box at home, and I released a pre-compiled binary. I figured that anyone who really wants to compile it natively, would be able to do so by patching the Makefile.

But, as a user, I always get pissed off by packages with home grown build systems, that never seem to quite cut it. So, I've autoconfiscated UnDBX, such that you can now extract the source code archive, and, on many platforms, do this:

cd undbx-0.12./configuremakemake install

and be done with it. On Window$ it means that you need to first install either Cygwin or MinGW (which is also a requirement for building the previous release).

I was a bit surprised at how easy it was to autoconfiscate UnDBX. Granted, UnDBX is almost trivial when compared to other free software projects. Furthermore, it was originally designed to run on both Window$ and Linux, so there was no need to modify it in the process. And yet, autoconf/automake with all that mass of machine generated convoluted shell scripts and makefiles, are quite intimidating beasts to the uninformed.

The source code package includes a lot more files now, but except for configure.ac (16 line of code) and Makefile.am (5 lines), these are all machine generated. Actually, even configure.ac was mostly machine generated and I just had to tweak it a bit. Most of the work went into reading about autoconf/automake.

My only gripe with autoconf/automake is that there doesn't seem to be any kind of support for binary distribution. I know that in the context of GNU it makes perfect sense, but it's a hassle nonetheless. Anyhow, I've added a little script to the source tree that handles this too.

This whole build system stuff is nice, but shouldn't a new release have some new user-visible features?!

Well, I just couldn't quite ignore that GUI issue. So I whipped up a launcher script that you can double-click. You'll be presented twice with a standard folder selection dialog in order to select both the input and output folders, and then undbx.exe will be launched on your behalf inside a console window. Not much, but it's better than nothing, I guess.