Weekend Hacks: growl-notify and weeter for WeeChat
Tuesday, August 28th, 2007This weekend, a rather long one due to the observance of the National Heroes’ day, got me started into doing some little hacks for WeeChat, an IRC client that I have been using in place of Colloquy on the Macbook which I use at work. I have been using WeeChat originally because I’ve been using TOR to connect to the ‘Net, but later on I found out about WeeChat’s extensibility via script plugins that can be written in either Ruby, Lua, or Perl.
And, being the Perl monger that I am, and having lots of idle time (hey, this was a weekend
I looked for some way to better integrate my WeeChat to my Mac setup. The first thing I came up with was a way to get the app to send event notifications via the Growl framework (which I got from Adium,) since the WeeChat I have here is a console-only app (there is an ongoing GTK/wxWidgets UI port, but not available yet in MacPorts, where I got WeeChat.) A quick look at the Growl developer documentation, however, got me looking into Mac::Growl, which provides a very simple Perl interface to Growl. And thus, I came up with growl-notify, which now keeps me up to date on what’s going on in IRC while I’m doing something else.
The other thing that I got to work on with was a simple way to do Twitter status updates while on IRC. Of course, I do have the excellent Twitterific for Mac installed, but again I was raring for some quick hack to do at the weekend, so I decided to do this one too. In IRC, one can pretty much indicate his/her status by using the /me command (which is really a shortcut for doing a CTCP ACTION message, but I digress.) This particular command seemed to be a fairly natural command to tie a Twitter updater with, so it only took a while for me to look up Net::Twitter, write a modifier for the /me command, and come up with weeter.
Now, the week’s back, and I look forward to my work and its pending tasks (currently something involving PostgreSQL, GlusterFS, and lots of Amazon EC2 nodes
with a renewed zest for tackling problems. And when weekend comes again, its yet another time to recharge, and perhaps hack some more on better integrating the apps that I use in my workflow (and thus helping my productivity.)