scripts, shell

TTYtter: twitter client for real commandliners

If you are a twitter adict (I know you are already a commandliner ;) TTYtter is your client.

TTYtter requires only Perl 5.005 or better, and either cURL or Lynx. It supports encryption as long as your Lynx or cURL does. If your client supports it you can configure TTYtter to use SSL changing the relevant URLs. These can be changed using TTYter options (-url, -rurl, -uurl, -wurl, -update, -dmurl and -frurl) or you can cut and paste the following code into your .ttytterrc file in your $HOME directory:

url=https://twitter.com/statuses/friends_timeline.json
rurl=https://twitter.com/statuses/replies.json
uurl=https://twitter.com/statuses/user_timeline
wurl=https://twitter.com/users/show
update=https://twitter.com/statuses/update.json
dmurl=https://twitter.com/direct_messages.json
frurl=https://twitter.com/friendships/exists.json

The default cURL’s certificate bundle is old and may not support Twitter’s current CA. cURL offers an updater script in Perl which will rebuild a new certificate bundle suitable for installation.

I have also added a line to .ttytterrc with my username and password, so I don’t have to write them as an option.

user=myuser:mypassword

I have written, a simple script, ttytter.sh, to prevent having to type all the TTYtter options each time I  run it.

#!/bin/bash
export CURL_CA_BUNDLE=/opt/ttytter/ca-bundle.crt
/opt/ttytter/ttytter.pl -ansi

The -ansi option enables ANSI color sequences, which colours tweets and messages.

When you run the above script something like the following is printed on stdout:

$ ttytter.sh
trying to find cURL ... /usr/bin/curl
test-login SUCCEEDED!

######################################################        +oo=========oo+
         TTYtter 0.8.5 (c)2008 cameron kaiser                 @             @
                 all rights reserved.                         +oo=   =====oo+
       http://www.floodgap.com/software/ttytter/            a==:  ooo
                                                            .++o++. ..o**O
  freeware under the floodgap free software license.        +++   :O:::::
        http://www.floodgap.com/software/ffsl/              +**O++ #   :ooa
                                                                   #+$$AB=.
     tweet me: http://twitter.com/doctorlinguist                   #;;ooo;;
            tell me: ckaiser@floodgap.com                          #+a;+++;O
######################################################           ,$B.*o*** O$,
#                                                                a=o$*O*O*$o=a
# when ready, hit RETURN/ENTER for a prompt.                        @$$$$$@
# type /help for commands or /quit to quit.                         @o@o@o@
# starting background monitoring process.                           @=@ @=@
#
TTYtter><pfortuny>copying 1.6Gb from a Windows share. 3 minutes left...
6 minutes left... 7 minutes left... ??
<rafacas> Why are firefox eating up the whole CPU??
<eisokant> @rafacas You're not the only one Firefox has been doing the same here
since the last update - it drives me crazy
<rafacas> @eisokant: yes, I am considering to install the previous version...
<eisokant> If you use jQuery on your site; read this: http://bit.ly/v9RE - I am
convinced; are you?
<JacSoyYo> @rafacas all your CPUs are belong to us, mwahahaha

You can use internal commands like:

  • /help (/?) – Displays basic commands
  • /refresh (/r) – Grabs the newest tweets right away.
  • /quit (/q) – Quits TTYtter

TTYtter can be easily scripted and can be using as a bot or daemon too. For more info go to TTYtter’s home page.

If you want you can follow us on twitter: we are rafacas and pfortuny (n0str0m0 does not tweet… yet).

2 Comments

  • On 12.18.08 URL Directory said:

    well thanks for sharing this nice software. It is way too cool.

  • On 12.29.10 Kyle said:

    I would /love/ to integrate vim with ttytter so I could g ctrl-g for char count and just better editing. Any ideas?

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*Required Fields