launchd.plist generator
Project description
Install
$ [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
Links
readme-md - README.md generator
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2d5f2ae482cfe24c8816a6ba3749e2131acd9214b0b86f192a508ed57d7f490 |
|
MD5 | 2bc6a8a79dba7b228b37d2e361377944 |
|
BLAKE2b-256 | c3ccabc3d80a9649c8e15b9933d9e9d44cd3ee1f3c2ed058269aa490ad4707e0 |
Close
Hashes for launchd_generator-2019.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d0b6f70dc0961ef7723771e4bb5896a7409b0d6cf6f0d1be20730ba5bdf3fa9 |
|
MD5 | 3df0a0d5bde165fac4265c7fa8d31ca0 |
|
BLAKE2b-256 | c7c798dfe85a0fddeb26a39abd52992065212db5223e255dfd3103e59c915e4a |