Twidge : Automating twitter from the command line.

Today we take a quick look at another command line gem i’ve found over the last few weeks and that has been giving me quite a bit of joy. TWIDGE is the name of command line twitter client / command to read and update your tweets. But with most “command line tools” you can use some creative thinking to get a whole lot more out of them. fyi : commands are in bold font.

First of all : Lets start out by taking a look at the basic options.

twidge setup After installing Twidge, use this command to setup your account and enter your username and password credentials. Be sure to have a browser standing by, since you Twidge will setup your own API key on the twitter service and you’ll need to enter that into the setup process.

twidge update “your tweet” The simplest way to ‘tweet your tweet’

twidge lsrecent :  For the latest 20 updates from your friends stream.

twidge lsrecent -su : Same thing but only the updates you haven’t read.

twidge lsreplies :  This command will give all your @replies.

twidge lsdm : Your latest DM messages.

twidge follow knightwise : this wil let you follow us.

twidge unfollow knightwise : this command you’ll probably never use.

twidge lsfollowers : Who is following you

twidge lsfollowing : Who are you following

Now with some simple  bash scripts that you can even schedule via a cron command you can automate tweets.  For example I have written a script that goes something like this.

echo “good morning interwebs” | twidge update  this script runs every morning at about 5.30 to wish all of you guy good morning. By that time i’m already up and running, but am way too groggy to do that manually. Its of course not meant as spam or something, just a little way to let technology work for me.

I’ve also setup a separate twitter account for our home server. I’ve made the tweets ‘protected’ and i’m the only one ‘following’ this account. This allows me to have my server report things like diskspace and uptime every day. The scripts look like this.

fortune | twidge update This command gives me a daily ‘fortune cookie’ text. I use this tweet just to have my server preform a “ping of life” to my twitter feed.

uptime | twidge update With this command I get a daily report of the average load of my server

df -ah /dev/sda6 | tail -1 | twidge update This command gives me a (condensed) report about the amount of diskspace I have available on my backup drive

There are plenty of simple ways using standard linux commands and pipe outputs to make geeky combination with Twidge. I also put an echo “i’m done” twidge update line under some of the automated scripts I run , that way I’m always in tune with what my server is up to.

Weird ? yes, Practical ? maybe, Geeky ? Sure !  I know its dorky but why not give your home server a little more “personallity” by having it tweet to YOU instead of having to and look for them.  Just make sure you don’t write lame twitter scripts that annoy your friends. Keep any automated tweets you do to a minimum. ( Full disclosure : I do two or three automated ones a day at time intervals where some of the fans of the show are awake and i’m asleep. It has to do with planetary rotation and timezones). But aside from that ?  echo “have fun with twidge” | twidge update

Links.

Ultimate Geek Stuff : The twidge manual.

If you are still on Ubuntu 10.10 best download the Twidge .deb package here.

Related Posts

  • No Related Posts

Leave a Reply

Your email address will not be published.