项目地址: https://github.com/clidoc/clidoc
项目状态:v0.2-rc-3
,基本已经能用。
功能上与 docopt 类似,是用来自动处理 shell 传入参数的。与 docopt 的区别在于
希望各位可以帮忙做文档的 review(英文捉急),指出问题。
以下是 README.md 的开头,直接搬运过来:
clidoc
analyses the synopsis of command-line program, then generates code of specific programming language that could be used to process shell inputed values.
Workflow of clidoc
is as follow:
# front end.
synopsis --> | synopsis analyser | --> AST
# back end.
| cpp11 codegen |
AST --> | python codegen | --> argument processing code
| rust codegen |
| ... |
where
clidoc
would build up an AST(abstract syntax tree) according to user defined synopsis,As you can see, clidoc
plans to support codegen for multiple programming languages. Currently in v0.2
, clidoc
supports codegen of programming language C++11 and Python 2/3.