Package: twitch-game-notify
twitch-game-notifyThis is a Twitch notifier which notifies you when your favourite
steamers stream your favourite categories. Any flavour of unix that
supports GTK3 should work with this.With normal settings, this will send notifications to your existing
notification handler when a streamer is streaming categories you've specified.
There's also a tray icon so you can easily quit the application.InstallationThere are a few dependencies needed for this. I'll write
commands to install the dependencies for Ubuntu; however,
these packages are common, so translating this to whatever
package manager you use should be fairly easy.To get the dependencies needed for D-Bus notifications and for
displaying an icon in the system tray, runsudo apt install libdbus-1-dev libdbus-glib-1-dev \
                 libcairo2-dev libgirepository1.0-devIf you want to install twitch-game-notify globally on your machine (you
could also run this from the from source code directly fromrun_twitchgamenotify.py), install it using
pip with or without root as insudo pip3 install twitch-game-notifyRunning the above command with root isn't strictly necessary, but it'll
puttwitch-game-notifyin your$PATH, which is nice.ConfigurationConfiguration files something look like the following:# Twitch API authorization - see https://dev.twitch.tv/docs/api/twitch-api-client-id:"p0gch4mp101fy451do9uod1s1x9i4a"twitch-api-client-secret:"itqb0thqi5cek18ae6ekm7pbqvh63k"streamers:"distortion2":include:-"DarkSouls"# notify me only when Distortion2 plays Dark Souls"outerheaven":include:-"*"# notify me when OuterHeaven streams any categoryexclude:-"MetalGearSolidV:ThePhantomPain"# except for when he's playing MGSV"otzdarva":include:-"*"# notify me when Otzdarva streams any categoryexclude:-"21779"# except for League of LegendsHere you need to put in your authentication credentials, and specify
what streamers you care about and what categories they stream that you care
about (or don't care about). Note that you can specify categories using
either their names as they appear on Twitch or by their internal IDs—either is fine.
(Note that internal category IDs can be found by querying Twitch's API.)Setting up a configuration filetwitch-game-notify looks for a configuration file at two paths:$PROJECT_ROOT/config.yaml$XDG_CONFIG_HOME/twitch-game-notify/config.yamlwhere$PROJECT_ROOTis the base of the twitch-game-notify project
(which you generally only want to use if you're running from source),
and$XDG_CONFIG_HOMEdefaults to$HOME/.config, if you don't have it
defined.To get started, either copy the example configuration fileconfig.yaml.exampleto one of the above locations
(making sure to rename it toconfig.yaml) or runtwitch-game-notify --print-configwhich prints the example config file
to the terminal, which you can redirect to a file.Getting a Twitch API client ID and client secretTo get a Twitch client ID and client secret, you need to either create
or link an existing Twitch account withTwitch's dev
portal. Up to date instructions for obtaining a
client ID and client secret can be found atdev.twitch.tv/docs/authentication.UsageRun twitch-game-notify withtwitch-game-notifyor directly withrun_twitchgamenotify.py:./run_twitchgamenotify.pyFor a list of everything you can do with twitch-game-notify, runtwitch-game-notify --help