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
Scripts usage
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
Close
Hashes for launchd-generator-2019.4.18.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7d4403c7cd9b1a39546d93c0511a340ab4ab2e63d0210e919ccf62b0c02a464 |
|
MD5 | 1e8bebfb86e2dcd02230c2e34d461b26 |
|
BLAKE2b-256 | 34aa18991ec2704f5aec4a5a8c7c513ea7bbd493c7ed6f3875de6673b165b367 |