launchd.plist generator
Project description
Installation
$ [sudo] pip install launchd-generator
$ [sudo] npm i -g launchd-generator
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
Features
- generate launchd.plist from any script
- define launchd.plist keys in script comments
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
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-2020.12.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb7a8bbba9948ceade21a07a0b5d6bc831fc263211e77ea682182b0afea030a4 |
|
MD5 | baaa13a6e8e3d0b109f207ae3bf9be46 |
|
BLAKE2b-256 | 27f7c267dc3ff538cba5fb408b58c189638cc639c7d8d541b8b7d15d848369bf |