/twitch-notifier

A tool which notifies on different platforms about an starting stream

Primary LanguagePythonApache License 2.0Apache-2.0

Twitch-Notifier

A python script which posts a notification to my social media accounts.

Supports:

  • Mastodon
  • Twitter
  • Discord

Config

The bot is controlled via a configuration file with the name config.yaml in the directory above the script. An empty config can be found in config.sample.yaml. All keys should be self-explaining.

Additionally, the config can also be provided by an environment variable CONFIG. For that the config file needs to be base64 encoded and put into the value of the variable. This is useful for the execution in a docker container.

export CONFIG="$(base64 config.yaml)"

Not all posting endpoints needs to be used. Just leave the auth settings empty will disable the posting to the specific platform.

Run it

Directly with python3

To run the script directly navigate to the project folder and execute the following.

# Setup venv
python3 -m venv .venv
source .venv/Scripts/activate

# Install requirements
pip3 install -r requirements.txt

# Execute application
python3 twitch-notifier/__init__.py

Via Docker

The application can also be retrieved via the ghcr.io/poeschl/twitch-notifier docker image. For configuration of the docker container the config.yaml file is mapped into.

A pre-configured docker-compose.yaml can be found as a starting point. It expects the config file besides itself.

There is an image for each version and a :dev docker tag available. The dev Tag will be always bloody-edge. For the latest fixed version use :latest.