Skip to main content

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.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pybites_alarm-0.0.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file pybites-alarm-0.0.2.tar.gz.

File metadata

  • Download URL: pybites-alarm-0.0.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pybites-alarm-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9c27aa667473d4ba1f2bc5ed727bae33457c096fb35bf712fc4cc2aa68304a3a
MD5 f4b4b25d40195e840c54a4ccddf98b07
BLAKE2b-256 1a6d5e87f07a08f895bb27fb52a528c7ef593bac88df23ef4771a0eea4656423

See more details on using hashes here.

File details

Details for the file pybites_alarm-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pybites_alarm-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pybites_alarm-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 02c95f8a55551640ea3b17da70b4a383d253a6c05b78a432e019cfa882d21045
MD5 4fe8f177e39b246540d285de7cba7a30
BLAKE2b-256 bab99233260bb0c94f1d38fe87fcfc4a8b6e6027bf947f2596c4646e5ac615f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page