13 Jul
Posted by Harper as General at 11:51 PM
Tags: bot, django, google app engine, jabber, python, sleekxmpp, twitter, xmpp
I use twitter quite a bit. I like to post to twitter in the most unobtrusive way possible. I don’t like to interupt my workflow to post a quick thought or update. When they used to have their Jabber bot running – it was easy for me to just type in my update and get on with my gmail session or work. I didn’t have to load a page that was often down, or use some other tool. I was bummed when the jabber bot went away. I needed it back to keep up with my use case.
I got tired of waiting, so i made Excla.im. It is a simple App Engine hosted application that allows a person to very simply update their twitter status from any jabber account. It is not very feature full, doesn’t update all the other sites and doesn’t do much else besides just interact with the twitter API. It is very simple.
The technology behind it is just as simple. The GAE app is written in python and uses the django helper. It is super simple and is basically a storage container for account info. It was a breeze to develop and fun to work with.
The Jabber bot was a bit more complicated. I ended up using the sleekxmpp library to do all the XMPP heavy lifting. It is an awesome library. Makes all the hard stuff easy. I then used Shane Hathaway’s daemon.py to help daemonize the bot (btw thanks to Anders for talking me through the dirtiness of daemonizing). To hook into twitter I used the python twitter library. It is featureful and super easy to use. It also supports in newer versions (post r112) setting the source.
I was then able to wrap this all up in a fancy little bot that on receiving a message, grabs encrypted credentials from the GAE app, sends the message to twitter’s api and then chills out. Pretty sweet. Currently all the heavy lifting is on the bot side, instead of on the webapp side – but i may change that.
At some point, I would like to be able to grab a users twitter friends updates and push them to their jabber ids. However – I have yet to figure out a nice and clean way to get the updates without having them seem batched. I have some ideas and a couple things fleshed out – but i don’t want to totally replicate twitter just to get my friends updates.
I am toying with putting the bot up on google code since it is pretty simple and could easily be hooked into almost any webapp. I think that the idea of a simple (simpler than sleekbot) webapp integrated jabber bot would have been helpful in writing this – and i imagine that people looking to do a similar thing may have use for my hacked together code.
A couple take aways from doing this project. First off – python is fun. Second – working with a designer makes things look a LOT better. Aaron Salmon took some time to make excla.im look MUCH better than it did. Check out his stuff and hire him.
4 Responses
Robbie
July 16th, 2008 at 10:52 pm
1Works as advertisted. Thanks for setting this up!
alex
August 2nd, 2008 at 12:37 pm
2Excellent job. Using and loving it. Also great seeing you work with Aaron. He is excellent!
Adam
August 7th, 2008 at 3:29 am
3So are you running the Jabber bot on GAE or another server?
Did you have to get around any GAE restrictions to do that?
derek:b3studios
September 2nd, 2008 at 11:02 pm
4Finally an easy way to Twitter… How about Wordpress Support Harper? >:D…
Ok so, anyone that reads this blog, should know by now how infrequently I update this. Well that will change. From my understanding everyone whose blog I read never blogs! I’m thinking about starting the infrequent bloggers club. We would inevita…
Be sure and take a gander at my photos.
If you want to contact me click here to start a chat.
Status
follow me on Twitter
Pictures
Friends
Popular Tags
action awesome blogs books bush cell chicago chris colorado crobar dylan family food games google hacking harper hiromi humor india insane internet iraq job juggle juggling matiss metal movies music nokia phone php politic reed rock school search server sick Sites Technology travel video war
search
Categories
Archives
Recent Entries
Recent Comments
Most Commented
Nata2.org is © 1997-2008 Harper Reed. Theme stoled and inspired by the great BloggingPro theme by: Design Disease