Twitmon update: read and post to Twitter on the command line

I've posted a new version of Twitmon, my Python command-line Twitter client.  The new version includes a fix to work with the latest version of Twyt, but more importantly, it can now be used to post status updates to Twitter as well!

Download: twitmon, and don't forget to set your username and password in the script!

Twitmon will fetch new Twitter updates from your followees every couple of minutes, just as before.  But now you can update your status as well, just by typing the new status and hitting enter.

You can also edit the update as you're typing it, and use the arrow keys to navigate back and forth through updates you've previously typed.

Occasionally, the Twitter posts will be refreshed while you're typing, and mess up the display.  You can use the arrow keys to go back, then forward, to clean things up.  It's ugly when this happens, but it still works.


Tags: , ,
Comments (2)

Twitmon: command-line Twitter reader

I've been feeling dissatisfied while trying to read the Twitter statuses of people I'm following. What I usually want to do is read everything that has come in since the last time I posted something. Unfortunately, this is hard to do on Twitter's website. I have to go back through the pages, one by one, to find my last tweet, then start reading upwards and backwards until I get to the beginning again. It's a lot of work and the page load times could be better, so it leaves a lot to be decided.

Twitmon screenshotI decided to use the Twitter API to write a command-line client that would check Twitter every so often and spit out new updates. Turns out I didn't need to do much work: Twyt is an existing Python implementation of the API. I was going to write it in Python anyway, so I downloaded Twyt (on Ubuntu: sudo apt-get install python-twyt) and started poking around.

It wasn't immediately clear how to get started, but I read through Twyt's files until I figured out how to authenticate, fetch status data, and turn it into usable objects. I added some extra stuff to print out color text and to periodically check Twitter, and I've got something I can really use. The code is here: twitmon.

I haven't tested it on Windows; it should work in general, but the text colors may not. The colors can be turned off in the script. Normally, it will use the colors to highlight links and usernames. It will also highlight the current user's username separately from other names; I like this because I can quickly tell if anyone mentions me, and I can find my last tweet quickly.

Update: I've fixed the script to work with Twyt 0.7 (which is the version in Ubuntu 8.04) and 0.8 (which is currently the latest version). You can also now send updates to Twitter with it - just type them and hit enter, and they'll show up on the next refresh.


Tags: , , , ,
Comments (4)

Update your status on Twitter and Facebook with Perl

Here's twitface, a Perl script I wrote to set my Twitter and/or Facebook status from the command line.

Get twitface Apparently this violates Facebook's TOS. Oh well.

I run it as twitter to update Twitter, fbstatus to update Facebook, and twitface to update both. To accomplish this, I keep it in my ~/bin directory, with symlinks to it called twitter and fbstatus. So:

cd ~/bin
ln -s twitface twitter
ln -s twitface fbstatus

You'll have to edit the script once to set your Twitter and Facebook login info, but after that, it's as easy as:

twitface wasting time on social networking websites.

Remember that Facebook prepends '[Name] is' to the status you set.

You can also use this to send direct messages via Twitter as you normally would; so this type of thing works as you'd expect:

twitter d rtm Remember the milk...

I found Christian Flickinger's PHP+cURL code quite useful while writing this, since it meant I didn't have to dissect Facebook.

I'm new to Twitter right now, but it seems pretty fun. We'll see how it goes.


Tags: , , , , ,
Comments (3)

Bad Behavior has blocked 53 access attempts in the last 7 days.