I search for a tool that is / can:
- gratis
- free from dependencies (no scripting language interpreter needed, ...)
- preferably a single binary
- run on Linux, optionally Windows
- traverse a (sub)directory structure, processing all files with a certain extension
- replace all placeholders with their value that it retrieves from a structured file (one of json, xml, key=value or CSV)
- write output to a file with identical filename, but extension removed
- preferably open source and actively maintained
The utility could be run like this:
pt /var/opt/configfiles .template values.properties
One template could be named /var/opt/configfiles/fooapp/basic.conf.template with this content:
Say hello to ${Name}
Value.properties could be structured like this:
Name=me
Age=18
After the tool finished I would have a basic.conf.
I know this can be done using sed or awk. I could also write this myself in golang but both approaches are not what I'm looking for.