teemtee / fmf

Flexible Metadata Format
GNU General Public License v2.0
22 stars 28 forks source link

New project `fmf-jinja` #207

Open LecrisUT opened 1 year ago

LecrisUT commented 1 year ago

I want to let you guys know about a small feature project built upon fmf currently named fmf-jinja. In a nutshell it's a template renderer where you define a template directory (or files) and these are rendered in-place in the path structure of the fmf tree. I.e. with an input:

$ tree ./
./
├── .fmf
    └── version
├── main.fmf
└── template
    ├── template_file.yaml.j2
    └── orig_file.yaml
$ cat main.fmf
templates: /template

/rootA:
  vars:
    ...
/rootB:
  vars:
    ...

Then it generates:

$ fmf-jinja generate --output=./out
$ tree ./out
./out
├── rootA
│   ├── template_file.yaml
│   └── orig_file.yaml
└── rootB
    ├── template_file.yaml
    └── orig_file.yaml

Let me know what you guys think.