mehdi-S / twitch_notifier

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twitch_notifier

Description

php script with a bit of python which use the twitch API to check the status of one streamer and play a sound if he's online.

Created originally to transform a Raspberry Pi into a stream-notifier.

Not tested on a classic-desktop configuration

Usage

Twitch_notifier take two arguments

php twitch_notifier.php <streamer-name> <path-of-the-sound>

(note : sound file can be in all format supported by pygame, more info below)

Exemple

To check if kikettestar is streaming, and play sound.mp3 if he's online we can use

php twitch_notifier.php kikettestar ./sound.mp3

(note : in this case, the audio file is assumed in the same directory as the script)

congrats !

Prerequisites

Of course you'll need to have php and Python ready, in addition you also need to have the Pygame module installed.

More info about Pygame alt text

About


Languages

Language:PHP 72.1%Language:Python 27.9%