Skip to main content

CLI Alarm Clock

Project description

https://badge.fury.io/py/alarm.png https://pypip.in/d/alarm/badge.png https://pypip.in/license/alarm/badge.png

CLI Alarm Clock

https://raw.githubusercontent.com/dslackw/images/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 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 only GitHub tar archive alarm-1.6.tar.gz or zip archive alarm-1.6.zip. Some will make you laugh, have fun !!!

Requirements

- Python 2 or 3
- Mplayer

Installation

Using pip :

$ pip install alarm

uninstall:

$ pip uninstall alarm

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/.ararm/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 ...

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

alarm-1.6.tar.gz (17.9 kB view details)

Uploaded Source

File details

Details for the file alarm-1.6.tar.gz.

File metadata

  • Download URL: alarm-1.6.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for alarm-1.6.tar.gz
Algorithm Hash digest
SHA256 b49eb07d74f38ba284e78bcf96eb540769e37810bfcef45c9045cf353f561b0f
MD5 8fbf73d3068264e99b65f971d969cc83
BLAKE2b-256 8ffff2d06d9b0adbc20af8a6206d2b237ad1c601127871297b10f3a5514a2d72

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