Scrawls from Preston...

Powered by Pelican.

Fri 13 February 2009

Twitter to Growl Agent in Python

While my primary Twitter usage is on my iPhone - I sometimes get behind and would like to not have to catch up with 100 tweets at the end of the day. I've had [Growl](http://growl.info/) installed on my machine for a while now and figured it would be nice to just have some tweets appear in that.

I'm also always on the look out for reducing the number of apps I need to run, so I didn't want to run twitterific just for its growl support. A quick search of scripts that would link twitter to growl turned up some working and not working examples in ruby [ [1](http://jmettraux.wordpress.com/2008/11/04/ruby-twitter-growl/)

[2](http://blog.new-bamboo.co.uk/2007/3/2/squawk-twitter-growl-notifications)

[3](http://madram.wordpress.com/2007/03/07/twitter-growl-interaction/)

]

And some overly complex examples in Python which do their own twitter api calling. [

[4](http://www.aaronland.info/python/twitter/twnotifier/)

[5](http://urchin.earth.li/~jds/twit.tac)

]

I wanted to add some features, and lean on one of the well done twitter modules.

So here is another take on a twitter and growl conduit - done in python. Some of the features not seen in the others:

* Will watch your input devices for when you are idle/away and store up tweets to show you when you return

* Lets you designate certain users as being "sticky" so their tweets stay on screen

* manages a cache of user profile images

* is very lightweight (only about 100 lines of readable code)

**Requirements**

* You need [Growl](http://growl.info/) of course

* You need the Growl Python language bindings that are part of the [SDK](http://growl.info/downloads_developers.php)

* You need the less recognized, but very well done [Twitter module](http://mike.verdone.ca/twitter/) from Mike Verdone

Here is [the script](http://www.ptone.com/temp/twitter_monitor.zip)


https://ptone.com/dablog