docs: document RSS feed plugin
This commit is contained in:
@@ -289,6 +289,18 @@ MAXMIND_LICENSE_KEY=xxx ./scripts/update-data.sh # + GeoLite2
|
|||||||
|
|
||||||
Default time: 12:00. Timezone: `bot.timezone` config (default UTC).
|
Default time: 12:00. Timezone: `bot.timezone` config (default UTC).
|
||||||
|
|
||||||
|
## RSS
|
||||||
|
|
||||||
|
```
|
||||||
|
!rss add <url> [name] # Subscribe feed (admin)
|
||||||
|
!rss del <name> # Unsubscribe feed (admin)
|
||||||
|
!rss list # List channel feeds
|
||||||
|
!rss check <name> # 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
|
## Plugin Template
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|||||||
@@ -528,3 +528,32 @@ List:
|
|||||||
- Full scan sends acknowledgment before probing
|
- Full scan sends acknowledgment before probing
|
||||||
- 8 parallel workers, 20s overall timeout
|
- 8 parallel workers, 20s overall timeout
|
||||||
- Three check methods: HTTP status, JSON API, body search
|
- 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 <url> [name] Subscribe a feed to this channel (admin)
|
||||||
|
!rss del <name> Unsubscribe a feed (admin)
|
||||||
|
!rss list List feeds in this channel
|
||||||
|
!rss check <name> 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`
|
||||||
|
|||||||
Reference in New Issue
Block a user