Templating engine using jinja files and fmf metadata.
If you've found this project, chances are you already know about either the FMF or Jinja project. But for the sake of redundancy:
Jinja is a popular templating engine that enables one to substitute text from JSON/YAML/Python like objects into a template file/string.
FMF is an extension to YAML files that incorporates a file structure format and inheritance of the dictionary variables from the parent path to the children.
This project combines the two such that you can maintain your metadata in a folder structure with minimal effort and generate any necessary data folder structure you desire.
See example/simple
for a minimal example.
The output can then be generated using the python function fmf_jinja.template.generate
or using the cli interface fmf-jinja
:
$ fmf-jinja --root=example/simple generate --output=out
$ tree ./out
./out
├── rootA
│ ├── file.yaml
│ └── some_file.yaml
└── rootB
├── file.yaml
└── some_file.yaml
$ cat ./out/rootA/template_file.yaml
my_var: A