rsshubtrans/README.md
2026-04-12 18:30:18 +02:00

24 lines
1.2 KiB
Markdown

# rsshubtrans
Translation sidecar for [RSSHub](https://github.com/DIYgod/RSSHub). Sits between the client and RSSHub, translates feed items via Google Translate's free API, and caches translations in SQLite so repeated requests are instant.
## Why
RSSHub gives you RSS feeds for sources that don't offer them (Telegram channels, Twitter, etc). But when the source language isn't yours, the feed is unreadable. This proxy translates on the fly — request `/sk/telegram/channel/bricsnews` and you get the same feed back in Slovak.
## How it works
```
client ──→ translator (:5000) ──→ rsshub (:1200) ──→ source
├─ translate titles, descriptions, content:encoded
├─ cache in SQLite (keyed by lang + text, 7-day TTL)
└─ return modified XML
```
The translator doesn't touch the feed structure — it only rewrites text nodes in `<item>` / `<entry>` elements. The original feed format (RSS 2.0 or Atom) passes through unchanged.
## CNAME language routing
Point language subdomains at the translator (`sk.example.com`, `cs.example.com`). It reads the subdomain from the `Host` header and serves the reader in that language automatically — no path prefix needed.