feat: make alarm music file configurable via env var and CLI arg

This commit is contained in:
2026-06-18 17:01:26 +02:00
parent 434c49b609
commit dfc9f0cd94
3 changed files with 39 additions and 6 deletions
+6 -1
View File
@@ -27,11 +27,16 @@ This project uses Python 3 and `uv` for dependency management. To set up the env
Please refer to the [arcade-button-wiring.md](arcade-button-wiring.md) file for detailed instructions on how to connect the arcade button and its LED to the Raspberry Pi's GPIO pins.
## Usage
1. Make sure your audio file (`Laid Back - Sunshine Reggae.mp3` or any other MP3 you prefer) is in the project directory.
1. Make sure your audio file (`Laid Back - Sunshine Reggae.mp3` or any other MP3 you prefer) is in the project directory, or set a custom path.
2. Run the alarm clock script manually:
```bash
# Use the default music file or the MUSIC_FILE environment variable
python3 wecker.py
# Or pass a custom music file directly
python3 wecker.py --music-file /path/to/your/alarm.mp3
```
The music file is resolved in this order: `--music-file` argument, `MUSIC_FILE` environment variable, default `Laid Back - Sunshine Reggae.mp3`.
## Automating and Managing Alarms (GraphQL API)