launchd.plist generator
Project description
Installation
$ [sudo] pip install launchd-generator
Features
- generate launchd.plist from any script
- define launchd.plist keys in script comments
How it works
script.py
-> script.py.plist
, script.sh
-> script.sh.plist
#!/usr/bin/env <interpreter>
KEY: VALUE
CUSTOM_KEY@type: VALUE # custom key. @type required - array/bool/integer/string
CLI
usage: launchd-generator script ...
Examples
agent.sh
#!/usr/bin/env bash
# StartInterval: 10
agent.sh.plist
<key>ProgramArguments</key>
<array>
<string>/path/to/agent.sh</string>
<string>/path/to/agent.sh.plist</string>
</array>
<key>StartInterval</key>
<integer>10</integer>
agent.py
#!/usr/bin/env python
"""
WatchPaths: ~/Desktop
WatchPaths: ~/Downloads
"""
agent.py.plist
<key>ProgramArguments</key>
<array>
<string>/path/to/agent.py</string>
<string>/path/to/agent.py.plist</string>
</array>
<key>WatchPaths</key>
<array>
<string>/Users/username/Desktop</string>
<string>/Users/username/Downloads</string>
</array>
$ cd ~/Library/LaunchAgents && find . \( -name "*.sh" -o -name "*.py" \) | xargs launchd-generator
Related projects
classifiers-generator
- python classifiers generatorcommands-generator
- shell commands generatorlaunchd-generator
- launchd.plist generatorreadme-generator
-README.md
generatorsetupcfg-generator
-setup.cfg
generatortravis-generator
-.travis.yml
generator
Links
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
Close
Hashes for launchd-generator-2019.3.22.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b083d922a4fa843a13aea70de3d07e757a68e906502475565c723418ad92a8b8 |
|
MD5 | 1836404944678178e922d169a7ddd093 |
|
BLAKE2b-256 | e9e17bfc23f9dc5a8cce9b46a7774a61d6720eb1be3818619d675eccffb9e0f9 |
Close
Hashes for launchd_generator-2019.3.22-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb8584916d89463f84450bdd328c2898e1cb39f5adf85727768937b1c7f4122b |
|
MD5 | 8865747535af6c4475ab2d0adaa7b990 |
|
BLAKE2b-256 | be263a0cb5e925e1dbd62ae91b45a2c865456ce31177ed6c60198c091ac57c19 |