昔メモっといたんだけど、探すの大変だから書いとく。
Gaucheスクリプト。ネタ元はこちら。
Gauche-net-twitterがTwitterのapi v1.1に対応してないっぽくて間に合わんなーと思ったら
対応してるのがあった。
で、スクリプトの使い方は、consumer-keyなんかを書いたファイルを用意してコマンドを実行。それぞれのtweetは別スレッドで投稿されます。
% ./tweet-bals-batch-balk.scm ばるす > bals.log
結果はこんな感じでわかる。
% cat bals.log | grep done | awk '{print $1}'| sort | uniq -c
合計はこれで。
% cat bals.log | grep done | awk '{print $1}'| sort | uniq -c | awk '{ total+= $1}END{print total}'
コマンド名が長いのでシンボリックリンクを作成した。
% ln -s `realpath ./tweet-bals-batch-balk.scm` ~/bin/bals % bals ばるす > bals.log
詳しくはでたらめ英語なhelpをご覧ください。
% bals -h
Usage: bals [option ...] message
h|help : Show this help
n|number : Number of continuous tweets (default:endress)
k|key-file : The path of the file for which have listed the Consumer-key and Access-token
ex) twitter-id1 consumer-key1 consumer-secret1 access-token1 access-token-secret1
twitter-id2 consumer-key2 consumer-secret2 access-token2 access-token-secret2
...
twitter-idn consumer-keyn consumer-secretn access-tokenn access-token-secretn
(default: ~/.tbbbrc)
i|interval :Interval (default: 0.1)
s|suffix :Message suffix (default: !)
d|debug :Debug mode. Print message to console, Twitter not update
ソースはこちら。