Twitter Script for X-Chat

Posted on Thursday, October 23rd, 2008 at 7:33 am
The situation

Ok, the problem is I’ve to many programs opened at the same time in my Macbook. One for IM, i.e., Adium, one for IRC, i.e., X-Chat-Aqua, and one for twitter, i.e., Twhirl, which is not good. In Ubuntu, Pidgin will handle whole thing beautifully (yeah, you need mbpidgin plugin for Pidgin). Unfortunately, Adium can’t do that so I’ve to find another way out.

Then, I found this page on Internet discussing how to write a python script for posting tweet from X-Chat. Then, I combine it with the code from the sugree himself for syncing twitter and NokNok. Finally, I got this code for posting tweet to and retrieve updated from twitter within X-Chat.

First, you will need to install simplejson and python plugin for X-Chat. Then, put the code into Plugins directory of X-Chat, in my case, it is /Applications/X-Chat Aqua/Plugins. Next, you need to create a configuration file, called .xchattwitt.cfg in your home folder. Inside, put your twitter username/password and update interval like this

username = myname
password = mypassword
interval = 300

The interval is in second. Finally, restart your X-Chat or load the script into your X-Chat. Then, you can tweet by typing “/tweet This is my message” in any window. The updated tweets will be shown on your current window, with Twitter user name. If you don’t like any of this behavior, you can change it from the code.

You can download the code from here.

The code is distributed under WTFPL.


Ryan Paul and @Sugree

You can leave a response, or trackback from your own site.

Leave a Reply