Skip to main content

CLI Alarm Clock

https://gitlab.com/dslackw/images/raw/master/alarm/alarm-clock-icon.png

Alarm is command line alarm clock utility written in Python language.

How works

When the date and time coincides with the current date and time, the alarm starts playing the sound is selected for five consecutive times.

You can pause the alarm by pressing ‘p’ or ‘space’ is an attempt to cancel the ‘q’ or ‘ESC’. Change the volume of the alarm by pressing ‘*’ or ‘/’.

You can create a list and use it as an alarm sound:

$ cat *.mp3 > playlist.m3u
$ alarm -s 17 07:05 ~/Music/playlist.m3u

You will find some sounds in folder alarm/sounds in the GitLab tar archive. Some will make you laugh, have fun !!!

Requirements

- Python 3
- Mplayer

Installation

Using pip :

$ pip install alarm --upgrade

uninstall:

$ pip uninstall alarm

Get the source ‘git clone https://gitlab.com/dslackw/alarm.git

$ python3 setup.py install

Command Line Tool Usage

usage: alarm [-h] [-v]
             [-s] <day> <alarm time> <song>

optional arguments
  -h, --help       show this help message and exit
  -v, --version    print version and exit
  -s, --set        set alarm day, time and sound

  --config         use config file

example: alarm -s 21 06:00 /path/to/song.mp3

Example:

$ alarm -s 18 22:05 ~/alarm/sounds/wake_up.mp3

+==============================================================================+
|                              CLI Alarm Clock                                 |
+==============================================================================+
| Alarm set at : Wednesday 22:05                                               |
| Sound file : ~/alarm/sounds/wake_up.mp3                                      |
| Time : 21:06:41                                                              |
+==============================================================================+
Press 'Ctrl + c' to cancel alarm ...


+==============================================================================+
|                              CLI Alarm Clock                                 |
+==============================================================================+
| Alarm set at : Wednesday 22:05                                               |
| Sound file :  ~/alarm/sounds/wake_up.mp3                                     |
| Time : 22:05 Wake Up !                                                       |
+==============================================================================+
Press 'Ctrl + c' to cancel alarm ...
__        __    _          _   _         _
\ \      / /_ _| | _____  | | | |_ __   | |
 \ \ /\ / / _` | |/ / _ \ | | | | '_ \  | |
  \ V  V / (_| |   <  __/ | |_| | |_) | |_|
   \_/\_/ \__,_|_|\_\___|  \___/| .__/  (_)
                                |_|

Press 'SPACE' to pause alarm ...

Attempt 1

Attempt 2

Use config file in $HOME/.alarm/config:

$ alarm --config

+==============================================================================+
|                              CLI Alarm Clock                                 |
+==============================================================================+
| Alarm set at : Wednesday 07:00                                               |
| Sound file : /home/user/alarm/sounds/funny.mp3                               |
| Time : 00:09:22                                                              |
+==============================================================================+
Press 'Ctrl + c' to cancel alarm ...

Release files for alarm 3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alarm 3.0
File Size Uploaded
alarm-3.0.tar.gz 28.4 kB Details

Release files / alarm-3.0.tar.gz

Download URL alarm-3.0.tar.gz
Size 28.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ce82cff43084688cb3d306fa0bd15316a425a25b1c57b189a935eb4c080b7059
BLAKE2b-256 checksum
How to use checksums
70a2c377fd834e64acde7670da13ae1e0524db8173436969c4c9029ee2c1490c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

3.0 This release

1 release file

2.2

1 release file

2.1

1 release file

2.0

1 release file

1.7

1 release file

1.6

1 release file

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page