127 lines
15 KiB
Markdown
127 lines
15 KiB
Markdown
|
---
|
||
|
gitea: none
|
||
|
include_toc: true
|
||
|
---
|
||
|
# dictionaries/rougail/00-base.yml
|
||
|
|
||
|
```yaml
|
||
|
---
|
||
|
version: '1.1'
|
||
|
var: # A suffix variable
|
||
|
- val1
|
||
|
- val2
|
||
|
dyn{{ suffix }}:
|
||
|
description: A dynamic family
|
||
|
type: dynamic
|
||
|
dynamic:
|
||
|
type: variable
|
||
|
variable: _.var
|
||
|
var:
|
||
|
description: A dynamic variable
|
||
|
multi: true
|
||
|
default:
|
||
|
type: jinja
|
||
|
jinja: |
|
||
|
{% for val in __.var %}
|
||
|
t{{ val }}
|
||
|
{% endfor %}
|
||
|
description: add 't' to each var value
|
||
|
dyn_{{ suffix }}:
|
||
|
description: a Second dynamic variable
|
||
|
type: dynamic
|
||
|
dynamic:
|
||
|
type: variable
|
||
|
variable: rougail.dyn{{ suffix }}.var
|
||
|
var:
|
||
|
description: A variable dynamic
|
||
|
default:
|
||
|
type: suffix
|
||
|
var_suffix:
|
||
|
description: suffix from first family
|
||
|
default:
|
||
|
type: suffix
|
||
|
suffix: 0
|
||
|
var_suffixes:
|
||
|
description: merge suffixes
|
||
|
default:
|
||
|
type: jinja
|
||
|
jinja: |
|
||
|
{{ s1 }}-{{ s2 }}
|
||
|
params:
|
||
|
s1:
|
||
|
type: suffix
|
||
|
suffix: 0
|
||
|
s2:
|
||
|
type: suffix
|
||
|
suffix: 1
|
||
|
description: join suffix 1 et suffix 2
|
||
|
```
|
||
|
# Variables for "rougail"
|
||
|
|
||
|
| Variable | Description |
|
||
|
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||
|
| **rougail.var**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | A suffix variable.<br/>**Default**: <br/>- val1<br/>- val2 |
|
||
|
|
||
|
## A dynamic family
|
||
|
|
||
|
`standard`
|
||
|
|
||
|
|
||
|
This family builds families dynamically.
|
||
|
|
||
|
**Suffixes**: the value of the variable "rougail.var".
|
||
|
|
||
|
| Variable | Description |
|
||
|
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||
|
| **rougail.dynval1.var** ou **rougail.dynval2.var**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | A dynamic variable.<br/>**Default**: add 't' to each var value. |
|
||
|
|
||
|
### a Second dynamic variable
|
||
|
|
||
|
`standard`
|
||
|
|
||
|
|
||
|
This family builds families dynamically.
|
||
|
|
||
|
**Suffixes**: the value of the variable "rougail.dyn{{ suffix }}.var".
|
||
|
|
||
|
| Variable | Description |
|
||
|
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||
|
| **rougail.dynval1.dyn_tval1.var**, **rougail.dynval1.dyn_tval2.var**, **rougail.dynval2.dyn_tval1.var** ou **rougail.dynval2.dyn_tval2.var**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable dynamic.<br/>**Default**: value of the suffix. |
|
||
|
| **rougail.dynval1.dyn_tval1.var_suffix**, **rougail.dynval1.dyn_tval2.var_suffix**, **rougail.dynval2.dyn_tval1.var_suffix** ou **rougail.dynval2.dyn_tval2.var_suffix**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Suffix from first family.<br/>**Default**: value of the suffix. |
|
||
|
| **rougail.dynval1.dyn_tval1.var_suffixes**, **rougail.dynval1.dyn_tval2.var_suffixes**, **rougail.dynval2.dyn_tval1.var_suffixes** ou **rougail.dynval2.dyn_tval2.var_suffixes**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Merge suffixes.<br/>**Default**: join suffix 1 et suffix 2. |
|
||
|
|
||
|
|
||
|
# Example with all variables modifiable
|
||
|
|
||
|
```yaml
|
||
|
---
|
||
|
rougail:
|
||
|
var:
|
||
|
- val1
|
||
|
- val2
|
||
|
dynval1:
|
||
|
var:
|
||
|
- tval1
|
||
|
- tval2
|
||
|
dyn_tval1:
|
||
|
var: tval1
|
||
|
var_suffix: val1
|
||
|
var_suffixes: val1-tval1
|
||
|
dyn_tval2:
|
||
|
var: tval2
|
||
|
var_suffix: val1
|
||
|
var_suffixes: val1-tval2
|
||
|
dynval2:
|
||
|
var:
|
||
|
- tval1
|
||
|
- tval2
|
||
|
dyn_tval1:
|
||
|
var: tval1
|
||
|
var_suffix: val2
|
||
|
var_suffixes: val2-tval1
|
||
|
dyn_tval2:
|
||
|
var: tval2
|
||
|
var_suffix: val2
|
||
|
var_suffixes: val2-tval2
|
||
|
```
|