CommandAlarm


NameCommandAlarm JSON
Version 0.2.8 PyPI version JSON
download
home_pagehttps://github.com/alofgren/commandalarm
SummaryA simple command line program that allows users to set an alarm with a custom command.
upload_time2023-07-01 18:16:02
maintainer
docs_urlNone
authoralofgren
requires_python>=3.7
licenseGPLv3+
keywords alarm command command-line tool timer commandalarm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/alofgren/commandalarm",
    "name": "CommandAlarm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "alarm,command,command-line,tool,timer,commandalarm",
    "author": "alofgren",
    "author_email": "drelofren@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/b1/84/2a2da80657b20670f0ce1539551d25858440adc4f7bec0a166f80d785e56/CommandAlarm-0.2.8.tar.gz",
    "platform": null,
    "description": "# CommandAlarm\n\nCommandAlarm is a simple command line program that allows users to set an alarm with a custom command. \n\n## Installation\n\nTo install CommandAlarm, you can use [pip](https://pip.pypa.io/en/stable/):\n\n```bash\npip install commandalarm\n```\n\nAlternatively, you can clone the repository and install it manually:\n\n```bash\ngit clone https://github.com/alofgren/commandalarm.git\ncd commandalarm\npip install .\n```\n\n## Usage Output\n\n```\nusage: commandalarm [-h] [-v] [-d {1,2,3,4,5,6,7}] [-r] [-s] [-n] [-t TIMEOUT] time command [argument ...]\n\nSet an alarm with a custom command.\n\npositional arguments:\n  time                  the time in the format HH:MM:SS\n  command               the command to run\n  argument              the arguments to the command\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -v, --version         show program's version number and exit\n  -d {1,2,3,4,5,6,7}, --day {1,2,3,4,5,6,7}\n                        the day of the week as an integer from 1 to 7\n  -r, --repeat          repeat forever\n  -s, --shell           run command in a shell\n  -n, --no-check        don't check the command return code\n  -t TIMEOUT, --timeout TIMEOUT\n                        timeout in seconds for the command to complete\n```\n\n## Examples\n\nTo set an alarm for 2:00 PM and play a sound when the alarm goes off:\n```bash\ncommandalarm 14:00:00 aplay alarm_sound.wav\n```\n\nTo set an alarm for 9:15 AM on Wednesday to run a Python script with a timeout of 30 seconds: \n```bash\ncommandalarm 09:15:00 --day 3 --timeout 30 python3 script.py\n```\n\nTo run a command in a shell, use the -s or --shell option:\n```bash\ncommandalarm 16:00:00 --shell 'ENV_VAR=\"I am running in a shell\"; echo $ENV_VAR'\n```\n\nTo disable further option processing, use two hyphens (\"--\") before the command:\n```bash\ncommandalarm 16:00:00 -- ls -l\n```\n\n## Contributing\n\nIf 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).\n\n## License\n\nCommandAlarm is licensed under the [GPL License](https://github.com/alofgren/commandalarm/blob/main/LICENSE).\n",
    "bugtrack_url": null,
    "license": "GPLv3+",
    "summary": "A simple command line program that allows users to set an alarm with a custom command.",
    "version": "0.2.8",
    "project_urls": {
        "Bug Reports": "https://github.com/alofgren/commandalarm/issues",
        "Changelog": "https://github.com/alofgren/commandalarm/blob/main/CHANGELOG.md",
        "Homepage": "https://github.com/alofgren/commandalarm",
        "Source": "https://github.com/alofgren/commandalarm"
    },
    "split_keywords": [
        "alarm",
        "command",
        "command-line",
        "tool",
        "timer",
        "commandalarm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fadef48c054db0364333d0371245b63b42b254f20f371aa574ec6304d37571a5",
                "md5": "33d9425207bb6ecdfba518dd17889ee5",
                "sha256": "8486edfd7f084cc546f76340991aee9dd23bc90e14142d648024f3d6aaf00461"
            },
            "downloads": -1,
            "filename": "CommandAlarm-0.2.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "33d9425207bb6ecdfba518dd17889ee5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 18228,
            "upload_time": "2023-07-01T18:16:00",
            "upload_time_iso_8601": "2023-07-01T18:16:00.160344Z",
            "url": "https://files.pythonhosted.org/packages/fa/de/f48c054db0364333d0371245b63b42b254f20f371aa574ec6304d37571a5/CommandAlarm-0.2.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b1842a2da80657b20670f0ce1539551d25858440adc4f7bec0a166f80d785e56",
                "md5": "04d6fa62130201877afbe12d6e42e93e",
                "sha256": "ca57c12e13fcc770036fd79647c0be0c34ae38177a3b0b384301d48d18f0ecd3"
            },
            "downloads": -1,
            "filename": "CommandAlarm-0.2.8.tar.gz",
            "has_sig": false,
            "md5_digest": "04d6fa62130201877afbe12d6e42e93e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 18992,
            "upload_time": "2023-07-01T18:16:02",
            "upload_time_iso_8601": "2023-07-01T18:16:02.049921Z",
            "url": "https://files.pythonhosted.org/packages/b1/84/2a2da80657b20670f0ce1539551d25858440adc4f7bec0a166f80d785e56/CommandAlarm-0.2.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-01 18:16:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "alofgren",
    "github_project": "commandalarm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "commandalarm"
}
        
Elapsed time: 0.08258s