« NHK started broadcasting their radio program on business English online | Main | Commands Execution History »

IRC2Twitter Gateway Apps

Do you enjoy twittering? How do you play with Twitter? The best way I think is to post statuses via IRC. You may wonder how you can do it. Don't worry! Many people help you with their excellent tools.

Yappo and typester hacked up Perl scripts which work as a gateway and connect IRC to Twitter. To make it, the former implements POE::Component::Client::Twitter and the latter uses POE::Component::Jabber. If you're a Ruby guy, you might want to use tig.rb (twitter irc gareway) written by cho45. Super cool!

By the way, I use TwitterIrcGateway habitually. Today, I found there was Linux version of it (using Mono)! I went straight to test it and confirmed that it worked well in my environment, debian GNU/Linux (sid). According to mayuki, the author of TwitterIrcGateway, as it includes also Mono itself, we don't need to install it for ourselves in advance. Really great!

I wrote an init script like this:

$ cat /etc/init.d/TwitterIrcGateway
#!/bin/sh

NAME="TwitterIrcGateway"
DIR="/path/to/TwitterIrcGateway/"
OPT="--port=6669 --interval=60 --resolve-tinyurl=true --encoding=iso-2022-jp --ignore-watch-error=true --enable-drop-protection=true"
KILL="/usr/bin/killall"

case "$1" in
    start)
        echo -n "Starting $NAME..."
        cd ${DIR} && ./${NAME} ${OPT} 2> /dev/null &
        echo "."
        ;;
    stop)
        echo -n "Stopping $NAME... "
        ${KILL} $NAME
        ;;
    *)
        echo "Usage: /etc/init.d/$NAME {start|stop}"
        exit 1
        ;;
esac

exit 0

About

This page contains a single entry from the blog posted on April 16, 2007 2:19 AM.

The previous post in this blog was NHK started broadcasting their radio program on business English online.

The next post in this blog is Commands Execution History.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34