ひさしぶりにPlaggerを復活させてみた
昔よりインストールは楽になっていてgentooの場合
# emerge g-cpan # g-cpan -i Plagger
で一応はインストールできた。ただ、このままだと動作時に足りないライブラリがあった。
追加で以下のものをいれた(うろ覚え)。
# g-cpan -i HTML::TreeBuilder::XPath XMLRPC::Lite Net::SMTP::TLS URI::Find HTTP::Async
主にbloglines用にぼちぼち使っているのだが、未読の消化速度は劇的にあがった。
うまく取得できなかったのを読まなくなったのもあってw。
そこで、EntryFullText略してEFT用のassetsを書く必要があるわけだがこれが結構楽しい。
かつてProxomitronでそこらじゅうのサイトと無意味に格闘していたような楽しさだ。
で、個別のURLをテストするのにいちいちyamlを書くのはめんどくさいのでそれ用のスクリプトを書いてみた。
plt.sh
#!/bin/sh # PLAGGERTEST PLAGGER=plagger YAML=$HOME/tmp.yaml $PLAGGER -v if [ $# -lt 1 ];then echo "usage: $0 {url}" exit fi cat << _YAML_ > $YAML global: timezone: Asia/Tokyo log: #level: debug level: info plugins: - module: Subscription::Config config: feed: - $1 - module: Filter::EntryFullText config: force_upgrade: 1 - module: Filter::StripRSSAd - module: Filter::ResolveRelativeLink - module: Filter::AtomLinkRelated - module: Filter::TruePermalink - module: Filter::tDiaryComment - module: Filter::BlogPet - module: Filter::TTP - module: Filter::URLBL - module: Filter::FeedFlareStripper - module: Publish::Gmail config: mailto: gmail_user+test@gmail.com mailfrom: from@plagger mailroute: via: smtp_tls host: smtp.gmail.com:587 username: gmail_user password: gmail_pass _YAML_ fi $PLAGGER -c $YAML
$ chmod +x plt $ ./plt http://hoge/fuga/index.html
とか使う。
これでEFTのテストをしている今日この頃。