Wubot::Plugin::RSS - monitor an RSS feed
version 0.2.004
~/wubot/config/plugins/RSS/slashdot.yaml --- tags: news url: http://rss.slashdot.org/Slashdot/slashdot delay: 30m ~/wubot/config/plugins/RSS/my-feed-name.yaml --- url: http://www.xyz.com/rss delay: 1h user: dude pass: lebowski proxy: socks://localhost:2080
Monitors an RSS/Atom feed (anything that can be parsed with XML::Feed). Sends a message any time a new article shows up in the feed. The message will contain the following fields:
title: the article title subject: the article title, used for notifications link: the link body: article body
If an error occurs requesting the data, a reactor message will be sent containing the error in the subject, e.g.:
subject: Request failure: 404 Not Found
If the RSS feed cannot be parsed by XML::Feed, a message will be sent containing the XML::Feed->errstr, e.g.:
subject: Failure parsing XML Feed: $error text
If the feed contains no articles, the message will contain the text:
subject: RSS-myfeed: No items in feed
The RSS monitor uses the global cache mechanism, so each time the check runs, it will update a file such as:
~/wubot/cache/RSS-myfeed.yaml
The monitor caches all subject in the feed. When a new (previously unseen) subject shows up on the feed, the message will be sent, and the cache will be updated. Removing the cache file will cause all items in the feed to be sent again.
This plugin uses Wubot::Util::WebFetcher.
The standard monitor check() method.
To install Wubot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wubot
CPAN shell
perl -MCPAN -e shell install Wubot
For more information on module installation, please visit the detailed CPAN module installation guide.