$tweet tweeting from shell / command-line

Here’s my attempt at giving something back to the software world. While playing with the twitter API (which is uber-cool, BTW), it seemed I could update the status on my twitter account by simply doing an HTTP POST. Being a shell junkie that I am, I quickly whipped out a bash script, combined it with the power of cURL, and was able to “tweet” away in minutes.

Check it out. Source code provided here under the GPL License. Comments and feedback are welcome.

Pre-requisites are bash (though ksh should work, too) and curl. Here’s how you would use the program:

$tweet
Usage: ./tweet

Be sure to change the twitter username (either directly in the script where it says “ankur_shah” or by setting your “TW_UID” environment variable)

$tweet hola mundo

[9782 2009-06-24 12:45:38] Message length: 10
Please enter your twitter password:
[9782 2009-06-24 12:45:44] Posting message
[9782 2009-06-24 12:45:56] Got result [XML response from twitter]

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment