Plaggerでircbot

plagger-ircbotは情報収集系のbotとしてすばらしくよくできていますね。簡単に使い方をまとめました。

まず、plagger-ircbotの設定config.yamlを用意します。

設定

global:
  assets_path: /home/dann/tools/plagger/plagger/assets
  timezone: Asia/Tokyo

plugins:
  - module: Subscription::Config
    config:
      feed:
        - http://dann.g.hatena.ne.jp/dann/rss

  - module: Aggregator::Simple

  - module: Filter::Rule
    rule:
      - module: Deduped

  - module: Notify::IRC
    config:
      daemon_port: 9991
      nickname: infobot_
      server_host: irc.example.net
      server_port: 6667
      server_channels:
        - "#example"
      charset: utf8
      announce: notice

使い方

plaggerbot起動し、その後でcronでplaggerを実行します。

plagger-ircbot.pl -c config.yaml

cronでfeedなど収集

plagger -c config.yaml

# plagger-ircbotとBot::BasicBot::Pluggableでircbotは集約できそうだなぁということで、最近遊んでいます。