Archive
Twitter Command Line Interface
Monday March 17th, 2008I recently posted about how to use a shell script to post to Twitter. Today I'm providing the sequel to that, in the form of a thorough Unix/Linux Command Line Interface for Twitter. Since it's a work in progress, every time I update the source, I'll post the changes I make here at this blog post. Go to http://zachmargolis.com/projects/twitterCLI to be redirected here.
Download the Source Version 1.2.2
The code is hereby distributed under the Creative Commons "Attribution-Noncommercial-Share Alike 3.0 Unported" License.
Release Notes
- Version 1.2.2 Monday, June 2 2008
- More file parsing tweaks.
- Version 1.2.1 Monday, April 14 2008
- Another bug. The CLI in its current state relies on line for line accuracy in the XML files that it downloads. Minor tweaks from the Twitter gods mean I have to rejigger the program on the user end.
- Version 1.2 Friday, April 4, 2008
- I think the format of Twitter .xml files was altered a bit, so it completely threw off Twitter CLI. I fixed that, and then went on to add direct message suppor. New commands include ./twitter.out check and ./twitter.out direct [user] [message]
- Version 1.0.1 Tuesday, March 18, 2008
- Now Twitter CLI is no longer fooled by complex "from" links or daylight savings! Also, ./twitter.out me is a new alias for myself
- Version 0.9.9.9 Monday, March 17 2008
- This is the first public version. I stopped short of a full 1.0 because I know there's going to be some small bug that I catch sooner or later.
Installation
Unpack the zip file in a directory that you choose. Then, run the Makefile to compile the program. Just run make from that directory. There should now be an executable named twitter.out. You're done!
Instructions
Once you compile the program, just run twitter.out from whatever directory it's in. I recommend creating a permanent alias like just plain twitter. On the first time it starts up in any directory, it should ask for your login information. This is saved to a file with light encryption so as to preserve your privacy.
Then, you have a few options when running the actual program
./twitter.out arguments
- ./twitter.out
- ./twitter.out friends
- Displays a list of updates for the people you follow.
- ./twitter.out [update]
- Posts [update] to twitter. You don't have to use quotes around your post!
- ./twitter.out add [username]
- ./twitter.out follow [username]
- Adds [username] to the list of people you follow.
- ./twitter.out check
- ./twitter.out direct
- Displays direct messages sent to you.
- ./twitter.out direct [username] [message]
- Sends [message] directly to [username].
- ./twitter.out help
- Shows the list of available commands.
- ./twitter.out logout
- ./twitter.out bye
- Deletes the file with login information.
- ./twitter.out me
- ./twitter.out myself
- Displays your own updates.
- ./twitter.out oops
- ./twitter.out delete
- Deletes your most recent update and asks for confirmation.
- ./twitter.out public
- ./twitter.out global
- Displays recent global twitter updates.
That's all for now. Let me know what's up in the comments!
Special Thanks to:
- Wired.com for the original inspiration.
- Kenneth Finnegan for debugging and a few "Oh Duh!" moments.
Tags: projects Next Previous
Comments
Kenneth WALTOR Finnegan on March 17th at 8:46 PM