frep 是一个根据模版文件生成相应的配置文件功能,相关数据可以从环境变量,json,yaml, toml文件中获取。 本次 1.2.0 版本主要新增 toml 数据文件支持,以及全新的命令行解析器。 NAME: frep - Generate file using template USAGE: frep [options] input-file[utput-file] ... VERSION: 1.2.0-50 AUTHORS: Guoqiang Chen <subchen@gmail.com> OPTIONS: -e name=value, --env name=value set variable name=value, can be passed multiple times --json jsonstring load variables from json object string --load file load variables from json/yaml/toml file --overwrite overwrite if destination file exists --dryrun just output result to console instead of file --delims value template tag delimiters (default: {{:}}) --help print this usage --version print version information EXAMPLES: frep nginx.conf.in -e webroot=/usr/share/nginx/html -e port=8080 frep nginx.conf.in:/etc/nginx.conf -e webroot=/usr/share/nginx/html -e port=8080 frep nginx.conf.in --json '{"webroot": "/usr/share/nginx/html", "port": 8080}' frep nginx.conf.in --load config.json --overwrite frep 1.2.0 发布 - 生成模版配置文件下载地址