First commit

This commit is contained in:
Yorick Barbanneau 2022-11-29 00:27:56 +01:00
commit 3e88db9045
5 changed files with 191 additions and 0 deletions

20
templates/mako.j2 Normal file
View file

@ -0,0 +1,20 @@
{% if mako_options is defined %}
{% for option, value in mako_options.items() %}
{{ option }}="{{ value }}"
{% endfor %}
{% endif %}
{% if mako_rules %}
{% for rule in mako_rules %}
[ {%- for criteria in rule['criterias'] %}
{{ criteria.field ~ '="' ~ criteria.value ~ '"' }}
{%- if not loop.last %}{{ ' ' }}{% endif %}
{%- endfor %}]
{% for option, value in rule['options'].items() %}
{{ option }}={{ value }}
{% endfor %}
{% if not loop.last %}
{% endif %}
{% endfor %}
{% endif %}