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.3.tar.gz (3.6 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.3-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pybites-alarm-0.0.3.tar.gz
  • Upload date:
  • Size: 3.6 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.3.tar.gz
Algorithm Hash digest
SHA256 33c44c3d9342409c20df7dde5cf59b5f3d52c30e0b90a0cb25f854b74fd45df1
MD5 7fd57d390d930a363a0d7c7a475d2c74
BLAKE2b-256 5767199c70a3d63e6eeb673c52df7d539c11e374b8e4c8b20816ad59c2c36b00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pybites_alarm-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12c8d695e64303389e59c2485d5d7b440d413f1a8a3cc335d4208176b5020719
MD5 5e7ad5863f478572940815a23caaae19
BLAKE2b-256 d5a6b57051a56383ddb6724ceeda4c571a5a4de0dbcb21a1daadd53ac7986488

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