a basic Python script to play a sound at a designated time.
- install Python 3.7+ (to check which version you have, run
python --version) - install
ffmpeg(use this tutorial to install it) - (optional, only if you want to manually invoke the bell) install
keyboardwithpip(python -m pip install keyboard)
- install Python 3.7+ (to check which version you have, run
python3 --version) - install
ffmpeg(sudo apt-get install ffmpegorpacman -S ffmpeg, depends on your package manager) - (optional, only if you want to manually invoke the bell) install
keyboardwithpip(python3 -m pip install keyboard)
put in sections into hours.ini in the following format:
[hour]
SoundPath=<PATH_TO_SOUND_FILE>where:
[hour]is the time in a 24-hour format (e.g.[13:15])SoundPathis the path to the sound file to play (e.g.SoundPath=sounds/default.wav)
to run it, just do it with python main.py (or python3 main.py)
if you want to run it in the background, you can use nohup python3 main.py (linux only)