14
Apr

Twitter from the command line

Here we go with another post about Twitter of the many in the web every day.

To send a post to your account there are many ways, the most basic is going to the site and write it in the text box provided, or you can add Twitter to your IM account (doesn'n matter which, I think it supports all the clients/IM services) and sent whatever you want as a message which will be posted in your account or you can send a SMS and get the same result.

Mac users has Twitterific, a widget specific for this with some other options, Windows users have several widgets that do the same. This widgets allows you to update constantly (cool for Twitter addicts) and a lot easier than going to the site or sending a SMS, updating thru IM is similar in the sense that usually everyone has their IM client and is a matter of a couple of clicks, writing the message and that it.

But, what about Linux users?, to update we have the same options I mention above and in widgets there are some initiatives like glTwitter which in my case I didn't want to install it (ok, compile it) in my computer because I needed some dependencies. But it's not what I was looking for, because implied opening another app and since most Linux users spend a lot of time with console window to type commands I was looking to allow me send a post to Twitter in a quick and easy way and if it's from the command line what can be better?

I found a script that allows that using curl, simple, and easy to use/implement. But I still wasn't convinced, so I kept seaching and found Ruby Twitter Gem that does the same using ruby and hpricot with the advantage that it not only can send messages, also can show the last post of your friends.

Since it's written in Ruby you can use it in Linux, Mac or Windows, simply add the script with 'gem install twitter', allowing to install dependencies if you don't have hpricot installed and you are ready to send a message with:

$twitter "Message Text"

Before that you have to add the setting of your account to the .twitter file which is created the first time you run the command.

To get the last post of your friends is:

$twitter friends
or an specific friend
$twitter friend nick

As you can see, it can't be easier



0 Comment(s)




Language

Categories

Recent Posts

Last.fm

Lo que he escuchado en last.fm últimamente.

From my feeds