Tuesday, January 30, 2007

Twitish

I'm a huge twitter fan and it has even replaced Blogger as my prime blogging outlet.


Twitter has an API. The access methods is REST (of which I'm a huge fan) and the data obtained is in XML or JSON format. I'm a JSON newb so I picked the XML methods and came up with a REST based CLI shell for twitter called twitish.


You can download and use twitish. Will also put it up on the twitter wiki.


It's written in Perl and hence you will need that. It runs on Linux and might run on Cygwin and Windows. It also needs the following perl modules.


You can install the above modules using CPAN or from your Linux distro's repositories. The XML::Liberal is a very rarely used module in distro's so you might need to compile it.


Once you have those modules installed, you can start interacting with Twitter through the command line shell. It supports only three commands.

  • post will post a message to twitter. Something like "post Hi from twitish" will post "Hi from twitish" to your twitter-stream.
  • updates will print the last 10 updates made my you and your friends.
  • public will print the last 10 updates made by the general Twitter junta aka the Public Timeline.


Will add mode functionality soon. Also you will need to change some code in the twitish.pl file. Just replace "XXXXXX" with your username(e-mail) and "YYYYYY" with your password.


Have fun and do drop in your comments.


Technorati Tags : , , , ,

Labels: , ,

8 Comments:

At 10:09 PM, January 30, 2007, Blogger RamantheB said...

maybe you can build a plugin to mozilla (extension) to analyse your web browsing patterns and constantly update your blog of what you are browsing on the web. Maybe we can write a plugin that will analyse your browsing history(build filters so that you can filter out stuff you want no one to see). so if i see you browse stuff a lot about opengl then i know something is in the offing.

Maybe i will sit down one weekend and build something. you interested ?


But overall i think twitter is great, i just dont have enough time to explore it totally

 
At 8:02 AM, January 31, 2007, Blogger Abishek Goda said...

Way to go Topa. I haven't tried it your script yet but will give my feedback and comments after that.

Another outrageous idea is to talk into the phone and have it published in twitter. Outrageous or ridiculous?

 
At 10:00 AM, January 31, 2007, Blogger Toufeeq said...

Rama,

Yes. Something like that is in the works. It's a part-time hobby project so can't tell when I'll be able to give full details about that.

Abi,
Yes, That is outrageous. :)

 
At 1:23 PM, January 31, 2007, Blogger RamantheB said...

actually,abi thats not difficuilt at all,
audio blogging has been going on for a while.

set up asterisk and its great to work with.

call-> leave a message and its on twitter. Does twitter have a quicktime plugin ? (if not quicktime, then some container flash/wmv) ?

but i guess then you lose the original idea of twitter

 
At 9:35 PM, February 12, 2007, Blogger Dave said...

It would be cool if you could pipe text to it,, e.g.:

cat .plan | twitish.pl -p

 
At 11:02 AM, July 10, 2007, Anonymous phlyingpenguin said...

Hey, I thought that I'd let you know that I'm working on a twitter extension to set Pidgin status based on twitter status. I've got your script running the twitter bridge, and it seems to be a good fit. Honestly it doesn't do much more than load as a plugin and output the user's twitter status as a debug message, but I expect to be there someday. As soon as I can figure out the api for libpurple, it'll be cooking. It seems that their docs are in something of a disarray from their transition.

 
At 9:03 AM, July 11, 2007, Blogger Toufeeq said...

@phlyingpenguin : cool. I use pidgin a lot and would love to have this. Do keep me updated.

 
At 8:08 AM, February 26, 2008, Blogger andrew said...

nice program. i use a slightly modified version, but you are a lifesaver. exactly what i needed. thanks.

 

Post a Comment

Links to this post:

Create a Link

<< Home

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. My Way My blog. Toufeeq Hussain