Monday, January 18, 2010

The Tomboy and the Git

Tomboy's taming of the beast turned out to be a very useful feature for my daily note keeping. But emails are not the only pieces of information that I often find associated with tasks. Another recurring source that I want to reference are commits in source code management systems. So, if Tomboy can play nicely with my MUA, why shouldn't it play nicely with my source code repository browser as well?

Unfortunately, there's no drag-and-drop target for git repository viewers defined. Most viewers just don't let you drag from the commit list into another application. So, I tried to contact the guys from gitk, giggle, and gitg in the hope to define such a dnd target. The guys from gitg seemed to be the only ones interested in that functionality (good thing that gitg is currently my favorite browser anyways), and it didn't take long until they added the required features.

With that in place, it was easy to write a Tomboy addin that handles dropping of git references into a note analogous to dropping email messages: By creating a link with a nice icon and a meaningful text which when clicked opens the git repository viewer and selects the respective commit.



I like these little helpers. They have a good work/gain ratio.

Sunday, January 17, 2010

Extending and Automating Claws Mail - the sneaky way

The recent release of Claws Mail 3.7.4 has also seen a much more powerful version of the Python plugin. It is now possible to write scripts that are executed automatically on startup, shutdown, or opening of a compose window. It's also now possible to write scripts that work on an already opened compose window. The user interface got better as well (e.g. it's now possible to trigger scripts via toolbar buttons).

However, what the latest release still lacks, is documentation and examples. After all, features that are not documented don't exist. This is supposed to get better in the next release. I've started adding a few example scripts to the source distribution that show possible solutions to questions that have been raised on the user's mailing list lately. Most of these should already work with the released version of the plugin, with the exception of the startup script that show's how to add new menu items for custom actions into the main window (the examples being a menu item to mark a thread as read, and to add a menu item to create and show the Python plugin's API documentation on-the-fly - isn't introspection cool?).

Anyways, if anybody scripted something cool with the plugin, please consider sending the (well commented) script to me. I'd be happy to consider it for inclusion in the distributed examples.