根据模版文件生成配置文件 frep

码农软件 · 软件分类 · 常用工具包 · 2019-08-13 16:57:41

软件介绍

frep 是一个根据模版文件生成相应的配置文件功能,相关数据可以从环境变量,json,yaml,toml文件中获取。

比如根据 nginx.conf.in 模版文件 和 动态数据 data.json,动态生成 nginx.conf

frep nginx.conf.in --load data.json

具体帮助参考:

NAME:
   frep - Generate file using template

USAGE:
   frep [options] input-file[:output-file] ...

VERSION:
   1.2.0-50

AUTHORS:
   Guoqiang Chen 

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

本文地址:https://codercto.com/soft/d/12288.html

挑战编程技能

挑战编程技能

Brian P. Hogan / 臧秀涛 / 人民邮电出版社 / 2017-2 / 39.00元

新手程序员在具备了理论基础后,面对实际项目时,往往不知道如何解决问题;有经验的程序员在学习了一门新语言后,也会有很多不知道如何使用的特性。针对程序员的这一普遍困惑,资深软件工程师Brian P. Hogan在这本书中总结了57道练习题,教他们如何锤炼技能。这些练习题的难度会逐渐增加,使得编程训练充满挑战又乐趣多多。一起来看看 《挑战编程技能》 这本书的介绍吧!

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具