I just put together a little framework to help writing scripts against twitter streams called cltwitter. It’s pretty basic right now but the idea is that the framework handles grabbing the twitter stream you specify and then passing the stream through a set of filters you write.
At the moment there are three filters, one that strips everything but urls from the tweet, one that expands any shortened urls in the tweet, and one that posts any tweets with urls to delicious. Since filters can be combined (the output of the one filter goes into the input of the next – like unix pipes), this allows us to do some neat things like expanding all urls and then posting them to delicious.
Hope you find this useful.