Flavio Castelli

Debugging my life.

Kaveau: Easy and Integrated Backups Solution for KDE

| Comments

During the last week I had the possibility to work on anything I wanted, Novell’s hackweek is so cool :)

I decided to dedicate myself to an idea that has been obsessing me since a long time. Last December my brand new hard disk suddenly died, making impossible to recover anything. Fortunately I had just synchronized the most important documents between my workstation and my laptop, so I didn’t lose anything important. This incident make me realize that I should perform backups regularly and I immediately started looking for a good solution.

Personally I think that doing backups is pretty boring so I wanted something damned easy to setup and use. Something that once configured runs in the background and does the dirty job without bothering you. Let’s face the truth: I wanted Apple’s Time Machine for KDE.

After some searches I realized that nothing was fitting my requirements and I decided to create something new: kaveau.

What is kaveau?

Kaveau is a backup program that makes backup easy for the average user.

As you will see while coding/planning kaveau I made some assumptions and so only few things are configurable. I really think that sometimes “less is more”.

What does kaveau?

Current features:

  • it performs backups to an external storage device: I don’t think it will ever store backup data on a remote host. If you want to do that just use some good project like Backup pc.
  • it backs up the complete home directory of the user: storage is cheap and average users (like me) keep everything inside their home directory ( but it’s possible to exclude some directories from the backup).
  • it performs incremental backups.
  • the backup data are neither compressed nor stored in fancy formats: in this way you can plug your external disk into another machine and access your data without additional work.
  • backups are performed automatically every hour (of course only if your external disk is plugged).
  • notification messages are shown if your backup is older that a week. More enhancements are coming…

What technologies does it use?

Backups are performed using rdiff-backup because it’s damned easy to use, well tested (it’s used also in production environments) and packaged by all distributions.

The awesome solid library is used for interacting with the external disks is super easy.

Status of kaveau

I have been working on kaveau just for five days, so there’s still a lot of work to do.

A screenshot tour will give you the right idea of its status.

First run - external storage device attached

Backup wizard - page 1

Backup wizard - page 2

Backup wizard - final page

Backup operation in progress

Backup completed

Right now the code is available on this git repository but I don’t recommend you to try it (unless you want to find and fix bugs ;) ).

I would really appreciate:

  • feedback about the user interface (right now it looks too much like Time Machine).
  • icons: it would be great to have a desktop icon and some system tray icons (contact me for more details).
  • new code, bug fixes, code reviews, hints,…

New QJson Release

| Comments

Gran Canaria Desktop Summit has been great and really productive. I had the pleasure to meet people interested in QJson, chat with them but also hack with them.

In fact we hacked a lot, doing lots of changes to QJson:

  • the API has been cleaned, now it can be considered stable
  • unicode support has been completely rewritten
  • it’s now possible to convert QVariant objects into JSON ones

So it’s with a great pleasure that I announce the release of QJson 0.6.0.

Beware, since the API has been changed your application will probably break. I’m really sorry about that, but I guarantee it won’t happen in the future (as I said both API and ABI interfaces can now be considered stable).

QJson web site has been updated, reflecting all the changes made to the library. openSUSE packages has been moved from my home repo to KDE:Qt one.

One last note, if you have problems with QJson please contact me using the qjson-devel mailing list. You can subscribe here.

Rockmarble: See Who Is Going to Rock in Your Town

| Comments

During the last weekend I hacked a bit on rockmarble and I added a new feature: retrieve all the events happening in a certain city.

As usual data is provided by last.fm, which should return also the events “near” the specified city (don’t ask me to define a value for near :) ).

I have created new openSUSE packages, this time everything should work fine. Just make sure to remove all qjson packages before installing this release (in fact all the previous problems were due to packaging errors of qjson, now I have created new packages called libqjson0).

Packages are available for openSUSE 11.0, 11.1 and Factory (both for i586 and x86_64 architectures).

One last news: rockmarble has also a new site, something slightly better than github wiki ;)

Rockmarble: How to Follow Your Favourite Artists Tour With Marble

| Comments

During the last weekend I wanted to have some fun with QJson. So I came out with this idea: retrieve from last.fm the tour dates of my favourite artists and display the locations using Marble.

After some hacking I created this small application: rockmarble

If you have a last.fm account rockmarble will import your favourite artist list. Otherwise you can add one artists at a time.

The tour location will be displayed inside Marble, using openstreetmap.


In order to build/run it you will need:


You can grab the source code of rockmarble here.

If you are an openSUSE user you can use 1click install:



The geolocalization data are given by last.fm, so if you discover that Metallica are going to give a concert in the middle of the Pacific Ocean please don’t bother me :)

Special names

It seems that QJson doesn’t handle properly special characters. Maybe you will some artist with a blank name. I’m going to fix this issue asap.

More details

Visit rockmarble website


Who wants to integrate it into amarok’s context view? ;)

QJson: A Qt-based Library for Mapping JSON Data to QVariant Objects

| Comments

In order to realize a project of mine I started looking for a Qt library for mapping JSON data to Qt objects.

I came over a couple of solutions but none of them made me happy. So in the last weekend I wrote my own library : QJson The library is based on Qt toolkit and converts JSON data to QVariant instances. JSON arrays will be mapped to QVariantList instances, while JSON’s objects will be mapped to QVariantMap. The JSON parser is generated with Bison, while the scanner has been coded by me.


Converting JSON’s data to QVariant instance is really simple:

[] [ ]
// create a JSonDriver instance
JSonDriver driver;
bool ok;
// json is a QString containing the data to convert
QVariant result = driver.parse (json, &ok);

Suppose you’re going to convert this JSON data:

[JSON data] [ ]
{ "encoding" : "UTF-8", "plug-ins" : [ "python", "c++", "ruby" ],
  "indent" : { "length" : 3, "use_space" : true } }

The following code would convert the JSON data and parse it:

[] [ ]
JSonDriver driver;
bool ok;
QVariantMap result = driver.parse (json, &ok).toMap();
if (!ok) {
  qFatal("An error occured during parsing");
  exit (1);
qDebug() << "encoding:" << result["encoding"].toString();
qDebug() << "plugins:";
foreach (QVariant plugin, result["plug-ins"].toList()) {
  qDebug() << "\t-" << plugin.toString();
QVariantMap nestedMap = result["indent"].toMap();
qDebug() << "length:" << nestedMap["length"].toInt();
qDebug() << "use_space:" << nestedMap["use_space"].toBool();

The output would be:

encoding: "UTF-8" plugins: - "python" - "c++" - "ruby" length: 3 use_space: true


QJson requires:

  • cmake
  • Qt

Obtain the source

Actually QJson code is hosted on KDE subversion repository. You can download it using a svn client:

svn co svn://anonsvn.kde.org/home/kde/trunk/playground/libs/qjson

For more informations visit QJson site

Ruby Downloader for Jamendo

| Comments

Also this year I’ll attend the Linux day (a day dedicated to Gnu/Linux  and FLOSS that occurs every year in Italy) organized by my LUG. Guess what I’ll be talking about… ;)

While organizing the event somebody proposed to setup a local server with some music released under CC license. He suggested to download some albums from Jamendo (due to network issues we won’t be able to provide direct access to the website).

Since nobody wanted to download the albums by hand, last night I wrote a small ruby program that does the dirty job.


Ruby and json gem have to be installed on you machine.



./jamendo_downloader.rb –help

Download the top 10 rock albums:

./jamendo_downloader.rb -g rock -t 10

Have fun

I think there’s nothing more to say… enjoy it!

Can Dreams Became True?

| Comments

During the last years of university I spent some time wondering about my future job. After the degree I received  lot of offers (fortunately also good ones), but none of them matched with my “dream job” . There was always something missing/different. I was just trying to convince myself that the “perfect job” can exist only in our dreams when my feed reader pointed me here.

After reading these lines:

“ We are exploring new technologies, creating prototypes of future systems, and trying to find and shape some of the features that will be part of upcoming SUSE products and the ecosystem around that. It’s a fascinating job, challenging, fun, and always exciting. For somebody like me who loves to create new things and enjoys working with an awesome team of innovative people this is a dream job.”

I realized the description matched with all my wishes!

I immediately applied for the position and now, after more than a month, I’m looking at a signed proposal.

I’ve waited a long time before spreading my joy to the rest of the world… but now I just want to say that starting from 1st August I’ll be part of Suse’s Incubation team! :D

I’m really happy, excited and honoured for this awesome opportunity.

I wish you’ll be able to realize your dreams too!
Just a funny note… While Cornelius was writing about the job offer on his blog, I was having a dinner with another Novell employee: Massimiliano Mantione. I was listening to his personal story, wishing to find a dream job like his one. I have to admit I was a bit jealous :)

Still Coding

| Comments

Yes, long time has passed since my last post (really strange, isn’t it :D ). It has been a busy period, full of work, dog training and… coding (fortunately!).

During this time I’ve been working on XesamQLib creation. This is a Qt based library for accessing Xesam services. Its API is going to be similar to Xesam-glib one and it will make life easier for developers who want to interact with programs exposing Xesam service (who talked about Strigi? :D )

Right now I’m finishing to clean the code, in order to publish a first version of XesamQLib on KDE repository. I’ll keep you updated.

Two New Entries in My Life

| Comments

Last week two new entries entered my life.A shiny brand-new Macbook pro arrived on Thursday. I’ve always dreamed of one of this wonderful laptops (I’ve been an happy iBook user for a long time). Two weeks ago I finally surrendered (I’ve always been scared of the high price) and I’ve ordered this new toy. Now, after one week of usage I’m really happy about it.

Currently I’m using Linux as primary Os, but I’ll give a try also to KDE4 on Mac ;)

The other new entry is Baguette, a three-months old dachshund. She’s really lovely, running around the house eating random things like shoes (I think it’s a must for all pets) and usb cables (she’s already a geek-dog).

I think I’ll have to keep an eye on Baguette, otherwise I’ll find another bite on my Macbook pro apple ;)