A package to play an alarm after an interval
Project description
PyBites Alarm
Play a music file after an interval of N minutes. You can configure the tune to play ...
Install the tool
$ pip install pybites-alarm
$ alarm
usage: alarm [-h] (-s SECONDS | -m MINUTES) [-b | -d]
[-l SONG_LIBRARY | -f FILE | -v]
alarm: error: one of the arguments -s/--seconds -m/--minutes is required
Developer setup
$ git clone git@github.com:PyBites-Open-Source/pybites-alarm.git
$ cd pybites-alarm
$ make setup
$ source venv/bin/activate
$ make test
Configure
Create an .env
file and add ALARM_MUSIC_FILE
to an absolute path of the music file that should play when the timer ends. For example:
$ cat .env
ALARM_MUSIC_FILE=/Users/bbelderbos/Music/alarm.mp4
You can also set ALARM_DURATION_IN_SECONDS=<number_of_seconds_int>
to stop the alarm after N seconds.
Usage
$ python -m alarm.alarm -h
usage: alarm.py [-h] (-s SECONDS | -m MINUTES) [-b | -d] [-l SONG_LIBRARY | -f FILE | -v]
Play an alarm after N minutes
optional arguments:
-h, --help show this help message and exit
-s SECONDS, --seconds SECONDS
Number of seconds before playing alarm (default: None)
-m MINUTES, --minutes MINUTES
Number of minutes before playing alarm (default: None)
-b, --background Run timer in the background (default: False)
-d, --display_timer Show timer in console (default: False)
-l SONG_LIBRARY, --song_library SONG_LIBRARY
Take a random song from a song library directory, supported formats: .mp3, .mp4, .wav (default: None)
-f FILE, --file FILE File path to song to play as alarm (default: None)
-v, --version show program's version number and exit
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pybites-alarm-0.0.3.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for pybites_alarm-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12c8d695e64303389e59c2485d5d7b440d413f1a8a3cc335d4208176b5020719 |
|
MD5 | 5e7ad5863f478572940815a23caaae19 |
|
BLAKE2b-256 | d5a6b57051a56383ddb6724ceeda4c571a5a4de0dbcb21a1daadd53ac7986488 |