TwitterのTLをtiarraで取得するtips。大きく分けて3工程。

  1. Mac上で.netアプリを動かすためにmonoを導入する
  2. TIGをインストール
  3. tiarraでTIGを読み込む

まず、monoのインストール。以下のリンクから最新版をダウンロードし、インストールする。

  • Mono(公式が落ちていたのでダウンロードページ)

SS_2009-10-26_23.35.08

Mac OS X->Intelをダウンロード。

SS_2009-10-26 23.37.53

解凍するとインストーラが入ってるのでインストールする。

インストールが完了したら、Terminalでmonoと入力してコマンドが通るかをチェックする。

$ mono
Usage is: mono [options] program [program-options]

Development:
    --aot                  Compiles the assembly to native code
    --debug[=]    Enable debugging support, use --help-debug for details
    --profile[=profiler]   Runs in profiling mode with the specified profiler module
    --trace[=EXPR]         Enable tracing, use --help-trace for details
    --help-devel           Shows more options available to developers

Runtime:
    --config FILE          Loads FILE as the Mono config
    --verbose, -v          Increases the verbosity level
    --help, -h             Show usage information
    --version, -V          Show version information
    --runtime=VERSION      Use the VERSION runtime, instead of autodetecting
    --optimize=OPT         Turns on or off a specific optimization
                           Use --list-opt to get a list of optimizations
    --security[=mode]      Turns on the unsupported security manager (off by default)
                           mode is one of cas, core-clr, verifiable or validil
    --attach=OPTIONS       Pass OPTIONS to the attach agent in the runtime.
                           Currently the only supported option is 'disable'.

monoのセットアップはこれで終わり。

次に、TIG(Twitter IRC Gateway)のセットアップ。以下から最新版をダウンロードする。

SS_2009-10-26 23.40.48

解凍し、適当な場所に移動する。必要なのは解凍したディレクトリ内にあるBinというディレクトリ(以下ではBinディレクトリのパスを$BINとする)

起動方法および起動結果は以下の通り。

$cd $BIN
mono TwitterIrcGatewayCLI.exe --encoding=utf-8
Start TwitterIrcGateway Server v2.0.3451.29063
[Configuration] BindAddress: 127.0.0.1, Port: 16668
[Configuration] EnableTrace: False
[Configuration] IgnoreWatchError: False
[Configuration] Interval: 90
[Configuration] ResolveTinyUrl: True
[Configuration] Encoding: Unicode (UTF-8)
[Configuration] SetTopicOnStatusChanged: False
[Configuration] EnableDropProtection: True
[Configuration] IntervalDirectMessage: 180
[Configuration] ChannelName: #Twitter
[Configuration] EnableRepliesCheck: False
[Configuration] IntervalReplies: 300
[Configuration] DisableUserList: False
[Configuration] BroadcastUpdate: False
[Configuration] ClientMessageWait: 0
[Configuration] BroadcastUpdateMessageIsNotice: False
[Configuration] Proxy:
[Configuration] PostFetchMode: False

最後に、tiarraからTIGに接続する。

tiarra.confを以下のように編集する。

  • 215行目あたりに
    name: twitter

    を追加。

  • 312行目あたりに
    twitter {
    host: 127.0.0.1
    port: 16668
    in-encoding: utf8
    out-encoding: utf8
    user: hogehoge
    name: hogehoge
    password : hogehoge
    }

    を追加(hogehogeはついったのアカウントに合わせる)。

セットアップは以上。tiarraを再起動すると、チャンネルリストに#Twitter@twitterが追加される。


つぶやくとこんな感じ。

参考:

FC2ブックマークへ追加 Bookmark this on Delicious このエントリーを含むはてなブックマークはてなブックマーク - TwitterのTLをtiarraで取得する