[tutorial v1.1_070)] A conditional hidden family with Jinja (config and doc)

This commit is contained in:
egarette@silique.fr 2025-11-22 14:13:47 +01:00
parent a29f309835
commit 39ad27a7e0
2 changed files with 21 additions and 30 deletions

View file

@ -1,11 +1,11 @@
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
- [[tutorial v1.1_060] Family: a dynamic family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_060/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_060~1..v1.1_060))
- [[tutorial v1.1_061] A conditional disabled variable with dynamic identifier](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_061~1..v1.1_061))
# [tutorial v1.1_061)] A conditional disabled variable with dynamic identifier
# [tutorial v1.1_070)] A conditional hidden family with Jinja
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_061~1..v1.1_061)
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_070~1..v1.1_070)
[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/dynfam.html#a-conditional-disabled-variable-with-dynamic-identifier)
[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/calculation.html#a-conditional-hidden-family-with-jinja)
## Screenshot
@ -31,7 +31,7 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user-
Then switch to the tutorial page:
```shell
git switch --detach v1.1_061
git switch --detach v1.1_070
```
## Structure
@ -39,11 +39,11 @@ git switch --detach v1.1_061
<p>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./">.</a><br/>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/">firefox</a><br/>
    ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
    ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/10-manual.yml">10-manual.yml</a><br/>
    └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/20-manual.yml">20-manual.yml</a><br/>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./">.</a><br/>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/">firefox</a><br/>
    ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
    ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/10-manual.yml">10-manual.yml</a><br/>
    └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/20-manual.yml">20-manual.yml</a><br/>
<br/><br/></p>
Contents of the firefox/20-manual.yml file
@ -60,7 +60,10 @@ manual:
'{{ identifier }}_proxy':
description: '{{ identifier }} Proxy'
hidden:
variable: _.use_for_https
jinja: |-
{% if _.use_for_https %}
HTTPS is same has HTTP
{% endif %}
dynamic:
- HTTPS
- SOCKS
@ -127,7 +130,7 @@ This family builds families dynamically
*`hidden`*
**Hidden**: when the variable "manual.use_for_https" has the value "true"
**Hidden**: depends on a calculation
**Identifiers**: <br/>- HTTPS<br/>- SOCKS
@ -137,18 +140,6 @@ This family builds families dynamically
| **manual.*https*_proxy.port**<br/>**manual.*socks*_proxy.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *HTTPS* or *SOCKS* port.<br/>**Validators**: <br/>- well-known ports (1 to 1023) are allowed<br/>- registred ports (1024 to 49151) are allowed<br/>- private ports (greater than 49152) are allowed<br/>**Default**: the value of the variable "manual.http_proxy.port" |
| **manual.*https*_proxy.version**<br/>**manual.*socks*_proxy.version**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | SOCKS host version used by proxy.<br/>**Choices**: <br/>- v4<br/>- v5 **← (default)**<br/>**Disabled**: when the identifier is "HTTPS" |
### Let's generate the changelog
```shell
rougail -m firefox/ -o doc --doc.contents changelog
```
#### New variable
| Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **manual.*https*_proxy.version**<br/>**manual.*socks*_proxy.version**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | SOCKS host version used by proxy.<br/>**Choices**: <br/>- v4<br/>- v5 **← (default)**<br/>**Disabled**: when the identifier is "HTTPS" |
- [[tutorial v1.1_070] A conditional hidden family with Jinja](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_070~1..v1.1_070))
- [[tutorial v1.1_071] Jinja with a description](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_071/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_071~1..v1.1_071))

View file

@ -25,11 +25,11 @@
</head>
<body>
<h1>Directory Tree</h1><p>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./">.</a><br>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/">firefox</a><br>
&nbsp;&nbsp;&nbsp; ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/00-proxy.yml">00-proxy.yml</a><br>
&nbsp;&nbsp;&nbsp; ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/10-manual.yml">10-manual.yml</a><br>
&nbsp;&nbsp;&nbsp; └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/20-manual.yml">20-manual.yml</a><br>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./">.</a><br>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/">firefox</a><br>
&nbsp;&nbsp;&nbsp; ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/00-proxy.yml">00-proxy.yml</a><br>
&nbsp;&nbsp;&nbsp; ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/10-manual.yml">10-manual.yml</a><br>
&nbsp;&nbsp;&nbsp; └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/20-manual.yml">20-manual.yml</a><br>
<br><br><p>
2 directories, 3 files