I am having a problem with my usage statements in docopt.
This is how I'd expect usage to work in the script. The optional parameters (defined with []), I would like to be able to use them together or individually. So -t -o
or -o
or -t
should be valid. At the moments I cant use -o
without -t
.
If i use pipe |
to separate them I can't use both at the same time. I've tried various combinations. I cant seem to get it work as id like. Can anyone point out where I am going wrong?
"""
Description:
Script does stuff
Usage:
script.py (-d <ditem>) (-u <uitem>) (-p <pitem>) (-s <sfile>) [-t <tfile>] [-o <ofile>] [-v]
script.py (-d <ditem>) (-l) [-t <tfile>] [-o <ofile>] [-v]
script.py -h | --help
script.py --version
Options:
-v --verbose Does stuff
-t --tfile Does stuff
-o --output Does stuff
-l --litem Does stuff
-u --uitem Does stuff
-p --pitem Does stuff
-d --ditem Does stuff
-s --sitem Does stuff
-h --help Show this screen.
--version Show version.
"""