twit-growl

Use Growl to display messages from Twitter.

Written in Python, it uses wget (probably should have just used curl) and growlnotify (shipped from the Growl site under Extras), and the simplejson python library from Bob Ippolito. In other words, you'll need to install stuff to use this. It'll be a good learning exercise for ya!

One tip is that you can install the simplejson directory in the same directory as the script itself.

More installation instructions in the file itself.

Add a cron job to run this every so often.

Files

Updates

2007/03/31

Whoops. I was invoking the growlnotify command via python's os.system(), careful to 'quote' (with double quotes) things which had data from the user in them. Even changing double quotes to single, to prevent the typical sort of 'inserting commands in your data' problem, typically seen in MySQL injection attacks.

What I didn't realize, is that I didn't really know the rules of unix command-line magic. Turns out that, at least, back-tics (`) get run, even in a double quoted string.

Crap.

To fix this, I switched from using the simpler os.system() command to the just slightly more complex os.spawn*() command, which avoids going through shell to interpret the command, thus avoiding problems of command-line string interpolation completely. I hope.

2007/03/23

Switched from using wget to using curl; I believe curl is pre-installed on macs. I also hardcoded the path to growlnotify since I'm not getting /usr/local/bin added to my path for cron jobs.

2007/03/22

Initial version