从easy configs生成脚本文件
jinja-gen的Python项目详细描述
Jinja发电机
安装
从pypi存储库
$ pip install jinja-gen
来源
$ pip install -U .
用法
usage: jinja-gen [-h] [-f] [-c] [-o] [--dry] [-k] [-d] [--debug] [--exec]
[--no-dump]
Jinja Generator
optional arguments:
-h, --help show this help message and exit
-f , --file Path to the Jinja2 template file
-c , --config Path to the YAML configuration file, defaults to
<file_basename>.yaml
-o , --output-dir Output directory for generated files, defaults to
configuration file name
--dry A dry run showing files to be generated
-k , --output-name-key
An extra key identifier populated for template with
name
-d , --output-dir-key
An extra key identifier populated for template with
output directory
--debug Enable debugging
--exec Enable executable file outputs
--no-dump Flag to disable a deterministic dump of the
configuration file
示例
请参阅examples文件夹中的示例文件。
$ jinja-gen -f examples/sample.sh -c examples/sample.yaml
要启用可执行文件输出,
$ jinja-gen -f examples/sample.sh -c examples/sample.yaml --exec
许可证
麻省理工学院