Giter Site home page Giter Site logo

jinja2_template_gen_v2's Introduction

Project Title

Jinja2 Template Generation for Anuta NCX

The tool gives the ability to generate Anuta NCX form templates using Jinja2 Template Engine.

Details on how to define template variables, expressions and filters can be found here: Jinja2 Template Designer Documentation

Table of Contents

Pre-Requisites
Getting Started
User Guide
Feedback

Pre-Requisites

Mininum Python 3.5.2 installed on Windows, Mac OSX, Linux

Jinja2, PyYaml Python libraries (installation details in next section)

Getting Started

Tool can be downloaded via GitHub clone repository. Ensure you have a valid GitHub account.

To download via Git CLI: git clone https://github.com/lucabrasi83/jinja2_template_gen_v2.git

If you use GitHub Desktop, specify the following repository URL: https://github.com/lucabrasi83/jinja2_template_gen_v2.git

From your GitHub desktop client, click Clone Repository:

Alt text

Enter Repository URL as below and select local folder where you want repository to be cloned:

Alt text

After Repository is cloned, verify folder GitHub/jinja2_template_gen_v2 exists in folder specified as above:

Alt text

To get colored output on Windows, use PowerShell interpreter (ideally you should run it as local administrator).

You can start PowerShell in the same context folder by clicking "Files" in Windows Explorer as below:

Alt text

Make sure you the required libraries installed by running command pip install -r requirements.txt

If you have multiple Python versions installed, you may need to run pip3 install -r requirements.txt

Alt text

Verify Tool by entering command in PowerShell prompt: python start.py -h

You should get below output with help context:

Alt text

User Guide

The tool is structured in 3 folders:

. Base_Template_Files : Includes baseline template files for each customer within a subfolder. The subfolder name represents the customer treegram.

. Templates_Inputs: Includes YAML file to gather service specific inputs. Same as above, subfolders are organized based on customer treegram.

. Templates_Generated: Includes generated templates organized in subfolders by customer name and site name.

  1. To view the current variables defined in a base template file, you can run command: python start.py -xv <TREEGRAM>/<BASE_TEMPLATE_FILE>

Example below displays the output of this command:

Alt text

  1. To generate YAML file inputs from variables defined in base template, run command: python start.py -gi <TREEGRAM>/<BASE_TEMPLATE_FILE>

  2. To generate template file to be used to provision service, run command: python start.py -gt <TREEGRAM>/<INPUT_YAML_FILE>

Feedback

All bugs, feature requests, pull requests, feedback, etc., are welcome. Create an issue.

jinja2_template_gen_v2's People

Contributors

boristalavera avatar amaansk avatar lucabrasi83 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.