feat: add Reddit and Mastodon backends to alert plugin

Search Reddit posts (rd) via JSON API and Mastodon hashtag
timelines (ft) across 4 fediverse instances. Both public,
no auth required.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-15 22:42:06 +01:00
parent 83a1d37b98
commit f84723f66d
3 changed files with 131 additions and 13 deletions

View File

@@ -660,10 +660,10 @@ Title Three -- https://example.com/page3
### `!alert` -- Keyword Alert Subscriptions
Search keywords across multiple platforms (YouTube, Twitch, SearXNG) and
announce new results. Unlike `!rss`/`!yt`/`!twitch` which follow specific
channels/feeds, `!alert` searches keywords across all supported platforms
simultaneously.
Search keywords across multiple platforms (YouTube, Twitch, SearXNG, Reddit,
Mastodon/Fediverse) and announce new results. Unlike `!rss`/`!yt`/`!twitch`
which follow specific channels/feeds, `!alert` searches keywords across all
supported platforms simultaneously.
```
!alert add <name> <keyword...> Add keyword alert (admin)
@@ -682,17 +682,18 @@ simultaneously.
Platforms searched:
- **YouTube** -- InnerTube search API (no auth required)
- **Twitch** -- Public GQL endpoint: live streams and VODs (no auth required)
- **SearXNG** -- Local SearXNG instance (no auth required)
- **YouTube** (`yt`) -- InnerTube search API (no auth required)
- **Twitch** (`tw`) -- Public GQL endpoint: live streams and VODs (no auth required)
- **SearXNG** (`sx`) -- Local SearXNG instance (no auth required)
- **Reddit** (`rd`) -- JSON search API, sorted by new, past week (no auth required)
- **Mastodon** (`ft`) -- Public hashtag timeline across 4 instances (no auth required)
Polling and announcements:
- Alerts are polled every 5 minutes by default
- On `add`, existing results are recorded without announcing (prevents flood)
- New results announced as `[name/yt] Title -- URL`, `[name/tw] Title -- URL`,
or `[name/sx] Title -- URL`
- Maximum 5 items announced per platform per poll; excess shown as `... and N more`
`[name/sx] Title -- URL`, `[name/rd] Title -- URL`, or `[name/ft] Title -- URL`
- Titles are truncated to 80 characters
- Each platform maintains its own seen list (capped at 200 per platform)
- 5 consecutive errors doubles the poll interval (max 1 hour)