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.
Metadata
Release files for CommandAlarm 0.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| CommandAlarm-0.2.8.tar.gz | 19.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| CommandAlarm-0.2.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.2 kB
Release files / CommandAlarm-0.2.8.tar.gz
| Download URL | CommandAlarm-0.2.8.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca57c12e13fcc770036fd79647c0be0c34ae38177a3b0b384301d48d18f0ecd3
|
|
BLAKE2b-256 checksum How to use checksums |
b1842a2da80657b20670f0ce1539551d25858440adc4f7bec0a166f80d785e56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Release files / CommandAlarm-0.2.8-py3-none-any.whl
| Download URL | CommandAlarm-0.2.8-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8486edfd7f084cc546f76340991aee9dd23bc90e14142d648024f3d6aaf00461
|
|
BLAKE2b-256 checksum How to use checksums |
fadef48c054db0364333d0371245b63b42b254f20f371aa574ec6304d37571a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|