Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

takuo/dokan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 

Repository files navigation

Dokan

The Dokan is a command line Twitter poster/stream viewer.

Copyright (c) 2010 Takuo Kitame <kitame@debian.org>
License: Ruby's

動作環境

Ruby 1.8/1.9 以上用

Windowsの場合、OpenSSL, Zlib, Readline,Iconv のインストール必須
libeay32.dll,ssleay32.dll,zlib.dll,readline.dll,iconv.dll などを ruby.exeと同じ場所に置く

必要な拡張ライブラリをインストール

(apt-get install libopenssl-ruby1.8)
gem install --no-ri --no-rdoc ruby-hmac oauth

使い方

OAuth認証(必須)
最初に認証成功したアカウントがデフォルトユーザに設定される

ruby dokan.rb -a -u username

ユーザ名を指定して投稿する

ruby dokan.rb -u username "なんたらかんたら"

デフォルトユーザで投稿する

ruby dokan.rb "なんたらかんたら"

デフォルトユーザを変更する

ruby dokan.rb -d -u username

デフォルトユーザを確認する

ruby.exe dokan.rb -d

標準入力から投稿する

echo "なんたらかんたら" | ruby dokan.rb

ruby dokan.rb
> なんたらかんたら
^D

ハッシュタグを自動挿入する

ruby dokan.rb -e -t tag1,tag2
#tag1,#tag2> なんたらかんたら
^D

ホームタイムラインを垂れ流す

ruby dokan.rb -s

垂れ流しをフィルタリングする -i オプションにNGワードをカンマ(,)区切りで指定 (大文字小文字区別なし)

ruby dokan.rb -s -i "shindanmaker,installnow,ついっぷるくじ"

ヘルプ

ruby dokan.rb -h
Usage: dokan [options]
    -a, --auth                       Authentication via OAuth
    -u, --user=user                  Username for Twitter
    -d, --default                    Set as default user, or show current default user
    -e, --extreme                    Enable extreme mode. Don't use with command line pipe.
    -t, --tags=tag,tag...            Insert hashtag automatically. Comma-Separated values. (w/o `#')
    -s, --stream                     Get timeline via user stream
    -i, --ignore=word,word...        Ignore keywords (NG word)
    -c, --color                      Colorize stream text

TVRock での使い方

dokanrock.rbを使います。
dokanrockはtvrockのログからステータスを取得して文字列を整形します。
ログは -s/-e オプションで指定される番組タイトルと -hオプションで指定されるチューナーデバイスコードを元にマッチした最新のログを使用します。
-r オプションに録画時間などを指定することで、整形に時間情報を含めます。

録画予約時の投稿

CR:"D:\ruby\bin\ruby.exe" "d:\dokan\dokanrock.rb" "録画予約 [%j %k-%l] %5「%d」 #%g"

録画開始時の投稿

CS:"D:\ruby\bin\ruby.exe" "d:\dokan\dokanrock.rb" -h "%h" -r "[%k-%l]" -s "%d" -c "%5" -t "%g"

録画終了時の投稿

CE:"D:\ruby\bin\ruby.exe" "d:\dokan\dokanrock.rb" -h "%h" -r "[%k-%l]" -e "%d" -c "%5" -t "%g"

About

The Dokan is a command line Twitter poster.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages