Generate script files from easy configs


Keywords
developer-tools, devops, jinja2, jinja2-templates, pypi, python3
License
MIT
Install
pip install jinja-gen==1.5.2

Documentation

Jinja Generator

Build Status PyPI version Project Status

Installation

From PyPI Repository

$ pip install jinja-gen

From Source

$ pip install -U .

Usage

usage: jinja-gen [-h] [-f] [-c] [-o] [--dry] [-k] [-d] [--debug] [--exec]
              [--no-dump]

Jinja Generator

optional arguments:
  -h, --help            show this help message and exit
  -f , --file           Path to the Jinja2 template file
  -c , --config         Path to the YAML configuration file, defaults to
                        <file_basename>.yaml
  -o , --output-dir     Output directory for generated files, defaults to
                        configuration file name
  --dry                 A dry run showing files to be generated
  -k , --output-name-key 
                        An extra key identifier populated for template with
                        name
  -d , --output-dir-key 
                        An extra key identifier populated for template with
                        output directory
  --debug               Enable debugging
  --exec                Enable executable file outputs
  --no-dump             Flag to disable a deterministic dump of the
                        configuration file

Examples

See sample files in examples folder.

$ jinja-gen -f examples/sample.sh -c examples/sample.yaml

To enable executable file outputs,

$ jinja-gen -f examples/sample.sh -c examples/sample.yaml --exec

License

MIT