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.2.28.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa83d0cd465a466085a2f76835361461f4846c48df4fdeeede747df6e840d775 |
|
MD5 | db4482dcc6f5d1b87f7cb69fe2677446 |
|
BLAKE2b-256 | 44f76eeb02bf0d35a0f6bb235d66ae2dd05ed74d121e4652d3e2a5422ab0acfe |
Close
Hashes for launchd_generator-2019.2.28-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51d5374e9e9995d353c6f00ead80b3efa15a8a71f155eab38e5fe033a031270e |
|
MD5 | c16bac35f6c03d4dacc8e718c73ec3bc |
|
BLAKE2b-256 | 127c3e3af73f0676fd6c1736088aaaa7b14a6b094f53f028acc9b11718c821eb |