a2797a8 Build docker images in CI, tidy up readme, add -v/--version arg
~nickbp pushed to ~nickbp/twitch-rss git
Generates RSS feeds for Twitch accounts.
This acts as a proxy to Twitch, presenting video history as an RSS feed. The idea is that you can add specific accounts to your RSS reader as separate URLs/feeds.
You can run it in two modes:
In order to use this, you first need to create a Twitch App and get the Client ID and Client Secret.
Those credentials will then be used by twitch-rss
to query Twitch APIs.
To install twitch-rss
, you can run cargo install twitch-rss
. Docker images for amd64/arm64 are also available, see the Dockerfile.
twitch-rss
using cargo install twitch-rss
.twitch-rss
with CLIENT_ID
and CLIENT_SECRET
envvars containing the Twitch App credentials. You can optionally also specify LISTEN
, 0.0.0.0:8080
is the default:
$ CLIENT_ID=1234...abcd \
CLIENT_SECRET=5678...efgh \
LISTEN=127.0.0.1:8080 \
./twitch-rss
twitch-rss
is running, you can then add it to your RSS reader with /rss?account=ACCOUNT_NAME_HERE
added to the end of the LISTEN
address. You can test this manually with curl
:
$ curl -v 'http://127.0.0.1:8080/rss?account=ACCOUNT_NAME_HERE'
You can also run twitch-rss
via the command line with the account to query as an argument. The command will then write the RSS payload to stdout. This is mainly useful for testing, or for writing the RSS payload to a static file.
$ CLIENT_ID=1234...abcd \
CLIENT_SECRET=5678...efgh \
./twitch-rss ACCOUNT_NAME_HERE
twitch-rss
mainly exposes options via environment variables. The one exception is specifying an account name to fetch as an argument, as shown in the CLI/stdout example above.
CLIENT_ID
/CLIENT_SECRET
: Your Twitch App credentials for querying the Twitch API. Required.LOG_LEVEL
: Amount of logging you'd like to have. Defaults to info
, can be set to debug
/trace
to get more logs or warn
/error
/off
to get fewer logs.HTTP-specific options:
LISTEN
: The listen address when running in HTTP mode. Defaults to 0.0.0.0:8080
(port 8080
on all interfaces).USER_CACHE_SECS
: The duration in seconds to cache information about Twitch accounts. Default is 86400
or 1 day.VIDEO_CACHE_SECS
: The duration in seconds to cache the recent videos for a given Twitch account. Default is 600
= 10 minutes)This project is licensed under the FAFOL. This is intended to restrict use of the project for purposes that would be considered unethical by its authors.