Created
March 14, 2022 08:30
-
-
Save dragonee/2f6a2eeec515cee34afaab55c36357b0 to your computer and use it in GitHub Desktop.
Docopt example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Wait for a specific process to finish, then notify via Pushover API. | |
Usage: | |
notify-on-exit [options] PID [MESSAGE] | |
Options: | |
-p High priority (this message will pop on the phone). | |
-b Run in the background. | |
--version Show version information. | |
-h, --help Show this message. | |
""" | |
VERSION = '1.0' | |
from docopt import docopt | |
# [...] | |
def main(): | |
arguments = docopt(__doc__, version=VERSION) | |
pid = int(arguments['PID']) | |
# [...] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment