Install Python
Install Jinja2
pip install jinja2
python config_generator.py [options] <folder1>/<folder2>/<template> [data.json]
root/
./config_generator.py
./templates/
./folder1/
./defaults.json
./defaults.json
./device1.j2
./folder2/
./defaults.json
./device2.j2
./device2.json
./json/
./data1.json
./data2.json
###TODO:
- cmd format // to ./templates/vendor/type/device.j2
- defaults parameters
- scan defaults.json in templates
- scan .json for .j2
- add option -t --template to set templates folder
- add option -o --output to set output folder
Original idea: Configuration Generator with Python and Jinja2, GitHub