verbosemode / confplate Goto Github PK
View Code? Open in Web Editor NEWConfig file generator based on Jinja2 templates
License: MIT License
Config file generator based on Jinja2 templates
License: MIT License
I am so grateful that you took the time to write and publish this to Github. I am a Network Engineer in Las Vegas, NV and have project every year that require the initial provisioning of 1000+ devices. I anticipate that this tool will be invaluable to me going forward. My question is that when I reference a CSV and configuration file together, the output will be sent by default to the screen. I have exported the output on my Windows machines using the "> configurations.txt" line appended after the command but that still only creates one bulk file. My goal is to export each configuration to a separate file with a unique name (preferably using the variables defined in the CSV such as "hostname" and "IP" so that others will know to which device the configuration belongs. I am by no means a programmer and have created this account on Github to simply ask you this question as I didn't know how to best contact you. Please let me know if you need any further information from me and if this request is possible with the current release. If it is not, I would be very interested in such a feature if you continued to develop this program. Thank you so much for everything so far and I look forward to hearing from you.
lobo@k0ld:/tmp$ cat foo.tpl
{% extends "base.tpl" %}
This is {{foobar}}
lobo@k0ld:/tmp$ cat base.tpl
This is also {{barfoo}}
lobo@k0ld:/tmp$ ~/fooIdoo/ConfPlate/confplate.py foo.tpl
foobar: lol
Traceback (most recent call last):
File "/home/lobo/fooIdoo/ConfPlate/confplate.py", line 441, in
print tpl.render_template()
File "/home/lobo/fooIdoo/ConfPlate/confplate.py", line 98, in render_template
return tpl.render(self.variables)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "foo.tpl", line 1, in top-level template code
{% extends "base.tpl" %}
File "base.tpl", line 1, in top-level template code
This is also {{barfoo}}
jinja2.exceptions.UndefinedError: 'barfoo' is undefined
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.