I have started using docopt-dispatch and I find it very intriguing. It makes docopt CLI code super-concise and readable.
Unfortunately, that package both has docopt as a hard dependency and is unmaintained for 7+ years.
If we integrated the dispatching project in docopt-ng some CLI code could look like this, preserving the compatibility with the original docopt spec and staying aligned with the syntax of the original dispatch project:
"""Run something in development or production mode.
Usage: run.py --development <host> <port>
run.py --production <host> <port>
run.py remote add <item>
run.py remote delete <item>
"""
from docopt import dispatch
@dispatch.on('--development')
def development(host, port, **kwargs):
print('in *development* mode')
@dispatch.on('--production')
def development(host, port, **kwargs):
print('in *production* mode')
if __name__ == 'main':
dispatch(__doc__)
Would you accept a PR that adds the dispatching feature to docopt-ng?
I have started using docopt-dispatch and I find it very intriguing. It makes docopt CLI code super-concise and readable.
Unfortunately, that package both has docopt as a hard dependency and is unmaintained for 7+ years.
If we integrated the dispatching project in docopt-ng some CLI code could look like this, preserving the compatibility with the original docopt spec and staying aligned with the syntax of the original dispatch project:
Would you accept a PR that adds the dispatching feature to docopt-ng?