A simple command line program that allows users to set an alarm with a custom command.
Project description
CommandAlarm
CommandAlarm is a simple command line program that allows users to set an alarm with a custom command.
Installation
To install CommandAlarm, you can use pip:
pip install commandalarm
Alternatively, you can clone the repository and install it manually:
git clone https://github.com/alofgren/commandalarm.git
cd commandalarm
pip install .
Usage Output
usage: commandalarm [-h] [-v] [-d {1,2,3,4,5,6,7}] [-r] [-s] [-n] [-t TIMEOUT] time command [argument ...]
Set an alarm with a custom command.
positional arguments:
time the time in the format HH:MM:SS
command the command to run
argument the arguments to the command
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-d {1,2,3,4,5,6,7}, --day {1,2,3,4,5,6,7}
the day of the week as an integer from 1 to 7
-r, --repeat repeat forever
-s, --shell run command in a shell
-n, --no-check don't check the command return code
-t TIMEOUT, --timeout TIMEOUT
timeout in seconds for the command to complete
Examples
To set an alarm for 2:00 PM and play a sound when the alarm goes off:
commandalarm 14:00:00 aplay alarm_sound.wav
To set an alarm for 9:15 AM on Wednesday to run a Python script with a timeout of 30 seconds:
commandalarm 09:15:00 --day 3 --timeout 30 python3 script.py
To run a command in a shell, use the -s or --shell option:
commandalarm 16:00:00 --shell 'ENV_VAR="I am running in a shell"; echo $ENV_VAR'
To disable further option processing, use two hyphens ("--") before the command:
commandalarm 16:00:00 -- ls -l
Contributing
If you would like to contribute to CommandAlarm, please feel free to submit a pull request or open an issue on the GitHub repository.
License
CommandAlarm is licensed under the GPL License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for CommandAlarm-0.2.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8486edfd7f084cc546f76340991aee9dd23bc90e14142d648024f3d6aaf00461 |
|
MD5 | 33d9425207bb6ecdfba518dd17889ee5 |
|
BLAKE2b-256 | fadef48c054db0364333d0371245b63b42b254f20f371aa574ec6304d37571a5 |