diff --git a/docs/CHEATSHEET.md b/docs/CHEATSHEET.md index 8eaeab2..97cfb7b 100644 --- a/docs/CHEATSHEET.md +++ b/docs/CHEATSHEET.md @@ -289,6 +289,18 @@ MAXMIND_LICENSE_KEY=xxx ./scripts/update-data.sh # + GeoLite2 Default time: 12:00. Timezone: `bot.timezone` config (default UTC). +## RSS + +``` +!rss add [name] # Subscribe feed (admin) +!rss del # Unsubscribe feed (admin) +!rss list # List channel feeds +!rss check # Force-poll now +``` + +Names: lowercase alphanumeric + hyphens, 1-20 chars. Max 20 feeds/channel. +Polls every 10min. Announces max 5 new items per cycle. Persists across restarts. + ## Plugin Template ```python diff --git a/docs/USAGE.md b/docs/USAGE.md index b9464d6..428e48a 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -528,3 +528,32 @@ List: - Full scan sends acknowledgment before probing - 8 parallel workers, 20s overall timeout - Three check methods: HTTP status, JSON API, body search + +### `!rss` -- RSS/Atom Feed Subscriptions + +Subscribe RSS or Atom feeds to IRC channels with automatic polling and +new-item announcements. + +``` +!rss add [name] Subscribe a feed to this channel (admin) +!rss del Unsubscribe a feed (admin) +!rss list List feeds in this channel +!rss check Force-poll a feed now +``` + +- `add` and `del` require admin privileges +- All subcommands must be used in a channel (not PM) +- If `name` is omitted on `add`, it is derived from the URL hostname +- Names must be lowercase alphanumeric + hyphens, 1-20 characters +- Maximum 20 feeds per channel + +Polling and announcements: + +- Feeds are polled every 10 minutes by default +- On `add`, existing items are recorded without announcing (prevents flood) +- New items are announced as `[name] title -- link` +- Maximum 5 items announced per poll; excess shown as `... and N more` +- Titles are truncated to 80 characters +- Supports HTTP conditional requests (`ETag`, `If-Modified-Since`) +- 5 consecutive errors doubles the poll interval (max 1 hour) +- Feed subscriptions persist across bot restarts via `bot.state`