Metadata-Version: 2.1
Name: CommandAlarm
Version: 0.2.8
Summary: A simple command line program that allows users to set an alarm with a custom command.
Home-page: https://github.com/alofgren/commandalarm
Author: alofgren
Author-email: drelofren@outlook.com
License: GPLv3+
Project-URL: Source, https://github.com/alofgren/commandalarm
Project-URL: Bug Reports, https://github.com/alofgren/commandalarm/issues
Project-URL: Changelog, https://github.com/alofgren/commandalarm/blob/main/CHANGELOG.md
Keywords: alarm,command,command-line,tool,timer,commandalarm
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Utilities
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# 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](https://pip.pypa.io/en/stable/):

```bash
pip install commandalarm
```

Alternatively, you can clone the repository and install it manually:

```bash
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:
```bash
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: 
```bash
commandalarm 09:15:00 --day 3 --timeout 30 python3 script.py
```

To run a command in a shell, use the -s or --shell option:
```bash
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:
```bash
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](https://github.com/alofgren/commandalarm).

## License

CommandAlarm is licensed under the [GPL License](https://github.com/alofgren/commandalarm/blob/main/LICENSE).
