Saturday, May 2, 2009

send a twitter messages from command line with bti

bti allows you to send twitter messages right from the command line. It works with both twitter.com and identi.ca. To use this program install the Ubuntu package with the same name (sudo apt-get install bti).

I was able to post a tweet message using bti within few minutes. The configuration is easy and straight forward. Have look at the bti example config file to get started quickly (/usr/share/doc/bti/examples/bti.example). The url shorting feature (with --shrink-urls option) however didn't work as intended though. Anyway its wonderful to be able to tweet from the command line, bti does have some pretty interesting features.
And don't forget to follow my tweets @playingwithsid.

About Bti micro-blogging command line tool

bti provides an easy way to send tweet messages direct from the command line or any script. It reads the message on standard input and uses the account and password settings either from the command line options, or from a config file, to send the message out.
It's primary focus is to allow you to log everything that you type into a bash shell, in a crazy, "this is what I´m doing right now!" type of way, letting the world follow along with you constant moving between directories and refreshing your email queue to see if there´s anything interesting going on.

11 comments:

  1. I use Twyt from the command line too. It's a Python API also. Easy and works well. Don't have a url-shortening function though.

    ReplyDelete
  2. Thanks for info Juego, I'll give
    twyt a shot. The reason I use bti is that its available in Ubuntu repositories and also its bash shell like features and ofcourse url shortening function.


    There are quite a few hacks on Internet that use curl / wget and shell scripting to tweet from the command line.

    Here are few links.

    http://www.sakana.fr/blog/2007/03/18/scripting-twitter-with-curl/

    http://www.linuxjournal.com/article/10222
    Also Blt from Cpan for Perl lovers
    http://search.cpan.org/dist/blt/bin/blt

    ReplyDelete
  3. Not extremely useful. If you use Emacs, you can write yourself a full-fledged Elisp Twitter client to use from within Emacs- most of the hard work has already been done by others, so you just have to glue together some code.

    ReplyDelete
  4. Not extremely useful. If you use Emacs, you can write yourself a full-fledged Elisp Twitter client to use from within Emacs- most of the hard work has already been done by others, so you just have to glue together some code.

    ReplyDelete
  5. @Artagnon

    Is there a emacslisp twitter script somewhere ?

    ReplyDelete
  6. See twittering-mode.el for example: http://is.gd/eeOH

    ReplyDelete
  7. @ Artagnon

    Thanks Pal, Gonna pop in into my emacs folder and try it out right away

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. I just had a look at twittering-mode.el myself. It fetches tweets fine and links are clickable. Apart from that, there seems to be some bug in the twittering-http-post function due to which it's not able to post tweets, avatar images are not resized, and worst of all, everything is synchronous- It interrupts work to fetch tweets. Overall, it's hardly usable a usable client and needs rewriting- I'm thinking of rewriting it myself. I'll notify you if and when it's done.

    ReplyDelete
  10. Just thought I should tell you.. the Twitter client project has taken off. It's called µblog.el and it's hosted at http://github.com/artagnon/ublog.el - It does what it says, but has many unimplemented features and bugs as of today. I think I got the inspiration to write it from your post ;)
    Here's a small screenshot: http://twitpic.com/9wvda/full

    Enjoy! :)

    ReplyDelete
  11. @Artagnon Kudos

    Perhaps you should write a short introduction about your script and how to use it on your blog. It would help people who might want to pitch it and help.

    Don't forget to post your script to EmacsWiki once your are done.

    ReplyDelete

You can leave a comment here using your Google account, OpenID or as an anonymous user.

Popular Posts