Date: 2010-02-10 21:24:00
twig - twitter irc gateway
My primary "instant" communications medium is IRC. I've used IRC for roughly 15 years and it's an integral part of my communications toolkit.

In order to follow Twitter, rather than having to reload the Twitter home page all the time or use a separate Twitter client, I was looking for a way to make tweets show up in an IRC channel. Originally I wrote an IRC "bot", which reloaded my Twitter page periodically and posted new tweets to an IRC channel. This was a bit fragile and wasn't a great solution, since it depends on connecting to some existing IRC network.

There is a project called BitlBee that is an IRC server that connects to various different IM networks (AIM, Jabber, etc). You connect your IRC client to your own local BitlBee server, which then connects to the IM networks of your choice. BitlBee is written in C and is therefore less easy to adapt and modify than if it were implemented in a more modern language.

I wanted to play with the Twitter Streaming API, so I wrote a Twitter-IRC gateway in Python called twig. Right now it does the simplest thing possible - it forwards tweets from the people you follow on Twitter into an IRC channel. It's a select-loop based single threaded implementation which should be easy to extend and modify.

If you use IRC and want to follow Twitter, check it out on Github.
Greg Hewgill <>