Skip to main content

launchd.plist generator

Project description

Install

$ [sudo] pip install launchd-generator

Features

How it works

script.py -> script.py.plist, script.sh -> script.sh.plist

#!/usr/bin/env <interpreter>

KEY: VALUE

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

launchd-generator-2019.2.27.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

launchd_generator-2019.2.27-py2.py3-none-any.whl (1.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page