Wednesday, 13 March 2013

TTYtter - A twitter client that makes twitter almost usable (like IRC)!

Twitter has been something I reluctantly used every 3-6 months or so, but I just did a search for command line twitter clients and was delighted that there were a few. I tried out one called TTYtter, which made twitter almost like IRC - in other words much more usable than the lame web interface!

Here's how to install on Ubuntu. I went for the latest version rather than the one in Ubuntu's repository.

sudo wget -O /usr/bin/ttytter
#check to see if a newer version is available

sudo chmod +x /usr/bin/ttytter

That's it really, but it'll annoy you more than pleasing you at this stage - you simply have to have the readline library working to enjoy it. At this stage, you can't use arrow keys to move forth and back, you can't use backspace beyond a line, any tweets coming through while you're writing will make you want to pull your hair out and it's generally a pain to use. So:

tar -xfv Term-Readline-TTYtter-*.tar.gz
cd Term-ReadLine-TTYtter-1.4/
perl Makefile.PL
sudo make install

You'll need to create a config file to take advantage of this, so open up your favourite editor (mine is nano) and create a file named ~/.ttytterrc with the following content:

Now start ttytter by executing it:

The first time you start it it'll guide you through setting the connection to twitter's API, after that it'll look something like this:
$ ttytter
-- readline using Term::ReadLine::TTYtter
-- using SSL for default URLs.
trying to find cURL ... /usr/bin/curl
-- Streaming API disabled (no -dostream) (TTYtter will use REST API only)
-- checking Term::ReadLine::TTYtter version:
-- checking TTYtter version:
-- your version of Term::ReadLine::TTYtter is up to date (1.4)
-- your version of TTYtter is up to date (2.1.0)
(checking credentials) test-login SUCCEEDED!
-- processing credentials: logged in as agerwick
TTYtter 2.1.0  (c)2012 cameron kaiser
all rights reserved. freeware under the floodgap free software license.

tweet me: * tell me:
type /help for commands or /quit to quit.
starting background monitoring process.

Can't ioctl TIOCGETP: Invalid argument
Consider installing Term::ReadKey from CPAN site nearby
Or use
perl -MCPAN -e shell
to reach CPAN. Falling back to 'stty'.
If you do not want to see this warning, set PERL_READLINE_NOWARN
in your environment.
TTYtter>  <000  

The red line is essential - if you don't get that, you need to look at the readline installation again.
Despite the last warning, readline works great. It even tells you how many characters you've written!

After a few seconds, all the latest tweets will come up. It checks your tweets asynchronously and they will thus pup up while you're writing. This is no problem if you have the readline library installed.

Remember anything you write will go straight to your twitter feed. The verify=1 argument in the config file makes it ask you to verify first, which is useful. Commands start with /, such as:
Also see the project page:

Here's a useful site for creating the .ttytterrc file:

Another great feature is the ability to send a single tweet from the command line:
ttytter -status="I'm sending this from my #GNU/#Linux shell using #ttytter"

No comments:

Post a Comment