1
0
angie-conv-image/j2cfg/test.j2

133 lines
2.7 KiB
Plaintext
Raw Normal View History

2024-07-20 18:29:09 +03:00
j2cfg:
{{ j2cfg }}
{% set x = [2,3,1,2] %}
x = {{ x }}
uniq_list:
{{ x | uniq_list }}
{% set x = ['2',3,'1','2'] %}
x = {{ x }}
list_remove_non_str:
{{ x | list_remove_non_str }}
{% set x = ['2','','1','2'] %}
x = {{ x }}
list_remove_empty_str:
{{ x | list_remove_empty_str }}
{% set x = ['2','3','1','2'] %}
x = {{ x }}
uniq_str_list:
{{ x | uniq_str_list }}
{% set x = '2 3 1 2 ' %}
"x = {{ x }}"
str_split_to_list:
{{ x | str_split_to_list }}
{% set x = '2:3::1:2:' %}
"x = {{ x }}"
str_split_to_list(':'):
{{ x | str_split_to_list(':') }}
{% set x = [1,2,3,4] %}
x = {{ x }}
is_sequence:
{{ x | is_sequence }}
{% set x = {1:2,3:4} %}
x = {{ x }}
is_sequence:
{{ x | is_sequence }}
{% set x = [1,2,3,4] %}
x = {{ x }}
is_mapping:
{{ x | is_mapping }}
{% set x = {1:2,3:4} %}
x = {{ x }}
is_mapping:
{{ x | is_mapping }}
{% set x = '1 2 3 4' %}
"x = {{ x }}"
any_to_str_list:
{{ x | any_to_str_list }}
{% set x = [1,2,3,4] %}
x = {{ x }}
any_to_str_list:
{{ x | any_to_str_list }}
{% set x = 3.1415926 %}
x = {{ x }}
any_to_str_list:
{{ x | any_to_str_list }}
{% set x = ['a2','b3','c1','d2'] %}
x = {{ x }}
is_str_list_re_match('[ab]'):
{{ x | is_str_list_re_match('[ab]') }}
is_str_list_re_match('[mn]'):
{{ x | is_str_list_re_match('[mn]') }}
{% set x = ['a2','b3','c1','d2'] %}
x = {{ x }}
is_str_list_re_fullmatch('[ab]'):
{{ x | is_str_list_re_fullmatch('[ab]') }}
is_str_list_re_fullmatch('[ab][12]'):
{{ x | is_str_list_re_fullmatch('[ab][12]') }}
{% set x = ['a2','b3','c1','d2'] %}
x = {{ x }}
str_list_re_match('[ab]'):
{{ x | str_list_re_match('[ab]') }}
str_list_re_match('[mn]'):
{{ x | str_list_re_match('[mn]') }}
{% set x = ['a2','b3','c1','d2'] %}
x = {{ x }}
str_list_re_fullmatch('[ab]'):
{{ x | str_list_re_fullmatch('[ab]') }}
str_list_re_fullmatch('[ab][12]'):
{{ x | str_list_re_fullmatch('[ab][12]') }}
{% set x = ['a2b','b3b','c1f','d2g'] %}
x = {{ x }}
str_list_re_sub('[ab]', '_'):
{{ x | str_list_re_sub('[ab]', '_') }}
str_list_re_sub('[mn]', '_'):
{{ x | str_list_re_sub('[mn]', '_') }}
{% set x = 'j2cfg-multi.py' %}
x = {{ x }}
sh_like_file_to_list:
{{ 'j2cfg-multi.py' | sh_like_file_to_list }}
{% set x = 'Accept-Encoding' %}
x = {{ x }}
as_cgi_header:
{{ x | as_cgi_header }}
{% set x = '_Permissions-Policy--' %}
x = {{ x }}
as_cgi_header:
{{ x | as_cgi_header }}
{% set x = 'VAR1=Etc/UTC' %}
x = {{ x }}
env_any_to_str_list:
{{ x | env_any_to_str_list }}
{% set x = ['VAR1=Etc/UTC', 'VAR2=', 'VAR3', '4VAR4=yeah', 'VAR5=yeah', 'VAR5=not-yeah'] %}
x = {{ x }}
env_any_to_str_list:
{{ x | env_any_to_str_list }}
{% set x = { 'VAR1': 'Etc/UTC', 'VAR2': '', 'VAR3': None, '4VAR4': 'yeah', 'VAR5=not': 'yeah', 'VAR5=real yeah': None, 'VAR6': {'pi': 3.1415926}, 'VAR7': ['pi', 3.1415926] } %}
x = {{ x }}
env_any_to_str_list:
{{ x | env_any_to_str_list }}