You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"{% for x in FOO | split(',') %}{{x}}{% endfor %}"| envcat -f j2 FOO # => abc
81
-
echo"{% if FOO == 'd,e,f' %}A{% else %}B{% endif %}"|envcat -f j2 FOO# => B
82
-
echo"{% if BAR | int + 1 == 42 %}yes{% endif %}"|envcat -f j2 BAR# => yes
81
+
echo"{% if FOO == 'd,e,f' %}A{% else %}B{% endif %}"|envtpl FOO # => B
82
+
echo"{% if BAR | int + 1 == 42 %}yes{% endif %}"|envtpl BAR # => yes
83
83
```
84
84
85
-
If you need more, please consult the [jinja2 documentation](https://jinja.palletsprojects.com/en/2.11.x/templates/).
86
85
87
-
**Note:**
88
-
There are some [subtle differences](https://straight-shoota.github.io/crinja/#:~:text=Differences%20from%20Jinja2) between [the jinja2 library used in envcat](https://straight-shoota.github.io/crinja/) and the original Python jinja2.
89
-
But likely none that you will encounter in normal usage.
86
+
## Template syntax
87
+
88
+
Envcat supports most jinja2 syntax and [builtin filters](https://jinja.palletsprojects.com/en/2.11.x/templates/#list-of-builtin-filters).
89
+
90
+
On top it provides the following additional filters:
echo "{%ifBAR | int + 1 == 42 %}yes{%endif%}" | envcat -f j2 BAR # => yes
84
+
echo "{%ifFOO == 'd,e,f'%}A{%else%}B{%endif%}" | envtpl FOO # => B
85
+
echo "{%ifBAR | int + 1 == 42 %}yes{%endif%}" | envtpl BAR # => yes
86
86
```
87
87
88
-
If you need more, please consult the [jinja2 documentation](https://jinja.palletsprojects.com/en/2.11.x/templates/).
89
88
90
-
**Note:**
91
-
There are some [subtle differences](https://straight-shoota.github.io/crinja/#:~:text=Differences%20from%20Jinja2) between [the jinja2 library used in envcat](https://straight-shoota.github.io/crinja/) and the original Python jinja2.
92
-
But likely none that you will encounter in normal usage.
89
+
## Template syntax
90
+
91
+
Envcat supports most jinja2 syntax and [builtin filters](https://jinja.palletsprojects.com/en/2.11.x/templates/#list-of-builtin-filters).
92
+
93
+
On top it provides the following additional filters:
0 commit comments