diff --git a/.gitignore b/.gitignore index 27c2358..f7275bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -venv_nautofake/ +venv/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..326c7a6 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Repo + +```sh +git clone https://tseed.work/tseed/gc_integration_templater.git --config "http.proxy=asblcinfpxy01:3128" +``` + +# Python venv + +- Host with Python version 3.6+ + +```sh +python3 -m venv $HOME/gc_integration_templater/venv +source $HOME/gc_integration_templater/venv/bin/activate +python --version +which python +pip install --proxy http://asblcinfpxy01:3128 --upgrade pip +pip install --proxy http://asblcinfpxy01:3128 pyyaml jinja2 +deactivate +``` + +# Run + +```sh +./render_engine.py +python3 render_engine.py +``` \ No newline at end of file diff --git a/python_venv.md b/python_venv.md deleted file mode 100644 index 8574ff0..0000000 --- a/python_venv.md +++ /dev/null @@ -1,13 +0,0 @@ -# Python venv - -- Host with Python version 3.6+ - -```sh -python3 -m venv $HOME/nautofake/venv_nautofake -source $HOME/nautofake/venv_nautofake/bin/activate -python --version -which python -pip install --upgrade pip -pip install pyyaml jinja2 -deactivate -''' \ No newline at end of file diff --git a/render_engine.py b/render_engine.py old mode 100644 new mode 100755 index f471c85..34bb44d --- a/render_engine.py +++ b/render_engine.py @@ -281,8 +281,10 @@ if __name__ == "__main__": main() # turn this into a tool? +# - wrap up into parameterized script, try with a real template # add comment block to each renderd config such as rendered date (maybe list templates in use?) # needs a config file to point to contexts/folders, use toml top allow for comments +# - feedback, the templates directory is confusing, templates/platforms # needs a rendered artefact directory parameter somewhere, maybe this should be a write_rendered_template parameter to allow it to be placed in another git repo # needs proper logging # needs a mode to create example files/dirs diff --git a/test.py b/test.py index 722b127..22b9065 100644 --- a/test.py +++ b/test.py @@ -111,14 +111,7 @@ def main(): if __name__ == "__main__": main() - # do a validation class - # do a device class - this should be added to a list that the render class does something with - - # what does this need to do? # render a config_context # render a jinja2 template - # print out a rendered context for someone to develop a jinja2 template - - # you can easily wrap this up as a class, it just needs to be called with some paths and have methods to return the config_contexts - # this really needs to be changed to validate all configs first, then start ingesting devices \ No newline at end of file + # print out a rendered context for someone when writing jinja2 templates \ No newline at end of file