File this one squarely in the "because we can," category, but the
Digital Streets blog has a tip for command line junkies who want to update Twitter without opening a web browser or a 3rd party application. All you need to do is install
cURL, a command line utility for Linux, Windows or OS X and then send a message to Twitter with your status updates.
In Ubuntu, here's how to install cURL:
- Open a terminal
- Type "sudo apt-get install curl" (without the quotes)
- Enter your root password when prompted
Once cURL is installed, you just need to type the following to send a tweet (this time you should include the quotation marks around your message): curl -u yourusername:yourpassword -d status="Your Message Here" http://twitter.com/statuses/update.xml
It's up to you to figure out why you would actually want to do this, but now you can.
Reader Comments (Page 1 of 1)
pierfrancesco99 said 7:51AM on 3-08-2008
How can install cURL and use in Windows XP ?
Reply
Brad Linder said 7:54AM on 3-08-2008
Try downloading cURL from this link:
http://curl.haxx.se/dlwiz/?type=bin&os=Win32&flav=-&ver=2000%2FXP
Reply
RazorD said 7:56AM on 3-08-2008
I wrote a perl script to do this too, its open source on google code (http://code.google.com/p/gmedtwitpost/)
you setup the username and password in the script and then just run 'gmedtwitpost.pl new_status' and it'll update.
Reply
Saul said 12:28PM on 3-08-2008
I blogged about doing this from the shell on the mac - using launchbar - it's darm easy, and works great
http://saulrosenbaum.com/blog/2007/10/16/the-raw-power-of-launchbar-shell/
Reply
Grant Robertson said 12:57PM on 3-08-2008
That is totally hot. Rawk!
Reply
Alex Gretlein said 8:21AM on 3-09-2008
Of course you would want to alias this with something like:
alias twit='curl -u yourusername:yourpassword -d status="$1" http://twitter.com/statuses/update.xml'
(preferably in your .bashrc or the like) and then you could just do "twit Message".
I'm not sure if KDE's Katapult or GNOME's Deskbar Applet recognize your Bash aliases. If they do, then you could use this to twit from either. (In Katapult type "exec" first.) If they don't, then just use Saul's tip and save it as a script in your path, and you'll be good to go in either. (There are also several Twitter plugins for Deskbar. I'm not sure if they do anything more than send messages, for which it seems curl is perfect.)
Lastly, you don't need to download curl, wget (installed by default on many *nix systems) should be fine:
wget -O - --user=USER --password=PASSWORD --post-data='status="MESSAGE"' http://twitter.com/statuses/update.xml
Reply
arrohwany said 10:15PM on 3-12-2008
Very great idea :0
i like it...
Reply