There's also legacy ARMASM syntax that is barely worth mentioning.
427 karma · joined June 4, 2012
There's also legacy ARMASM syntax that is barely worth mentioning.
ARM32 is a gem, in my opinion. A truly simple instruction set, and easy to get your hands on with Raspberry Pi or emulation.
About repeating program's name (say "naval_fate"), you can do:
"""Usage: prog <bla> ...
prog <bla> --bla
"""
args = docopt(__doc__.replace('prog', 'naval_fate'))It should be relatively easy to update it to work with 0.4; if you can make it work with 0.4 it would be great if you make a pull request to the project above.
naval_fate ship move <name> <x> <y> [--speed=<kn>]
to eliminate all the problems you named. Those problems are about specific interface, not docopt.We have just started to port to Ruby and Lua. All ports live under `docopt` organization on GitHub: https://github.com/docopt
You are very welcome to help us out with Ruby, Lua, and your favorite language :-).
I wanted to improve on presentation, since my last post: http://news.ycombinator.com/submitted?id=halst
Take an example:
Usage: quick_example.py tcp <host> <port> [--timeout=<seconds>]
quick_example.py serial <port> [--baud=9600] [--timeout=<seconds>]
quick_example.py -h | --help | --version
2 commands, 3 arguments, 5 options: in only 3 lines of DSL.Take a look at more examples: https://github.com/docopt/docopt/tree/master/examples
Making possible several help-screens for different commands is on it's way. The only stopper—deciding on API: https://github.com/docopt/docopt/issues/17