From d0301c3a41e92ff12a170a3eefab66c880677b68 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 9 Nov 2025 18:57:45 +0100 Subject: [PATCH] [tutorial v1.1_060)] A conditional hidden family with Jinja (config and doc) --- README.md | 39 +++++++++++++++------------------------ tree.html | 10 +++++----- 2 files changed, 20 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 18f88e9b..4d98a6b8 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ - [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md) -- [[tutorial v1.1_050] Family: a dynamic family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_050~1..v1.1_050)) +- [[tutorial v1.1_051] A conditional disabled variable with dynamic identifier](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_051/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_051~1..v1.1_051)) -# [tutorial v1.1_051)] A conditional disabled variable with dynamic identifier +# [tutorial v1.1_060)] A conditional hidden family with Jinja -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_051~1..v1.1_051) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_060~1..v1.1_060) ## Screenshot @@ -29,7 +29,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_051 +git switch --detach v1.1_060 ``` ## Structure @@ -37,11 +37,11 @@ git switch --detach v1.1_051

-.
- └── firefox
-     ├── 00-proxy.yml
-     ├── 10-manual.yml
-     └── 20-manual.yml
+.
+ └── firefox
+     ├── 00-proxy.yml
+     ├── 10-manual.yml
+     └── 20-manual.yml


Contents of the firefox/20-manual.yml file @@ -58,7 +58,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 @@ -125,7 +128,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**:
- HTTPS
- SOCKS @@ -135,18 +138,6 @@ This family builds families dynamically | **manual.*https*_proxy.port**
**manual.*socks*_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *HTTPS* or *SOCKS* port.
**Validators**:
- well-known ports (1 to 1023) are allowed
- registred ports (1024 to 49151) are allowed
- private ports (greater than 49152) are allowed
**Default**: the value of the variable "manual.http_proxy.port" | | **manual.*https*_proxy.version**
**manual.*socks*_proxy.version**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | SOCKS host version used by proxy.
**Choices**:
- v4
- v5 **← (default)**
**Disabled**: when the identifier is "HTTPS" | -### Let's generate the changelog - -```shell -rougail -m firefox/ -o doc --doc.contents changelog -``` -#### New variable - -| Variable                                                                                                     | Description                                                                                                  | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.*https*_proxy.version**
**manual.*socks*_proxy.version**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | SOCKS host version used by proxy.
**Choices**:
- v4
- v5 **← (default)**
**Disabled**: when the identifier is "HTTPS" | - - -- [[tutorial v1.1_060] A conditional hidden family with Jinja](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](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)) diff --git a/tree.html b/tree.html index 845041b9..b63efbc0 100644 --- a/tree.html +++ b/tree.html @@ -25,11 +25,11 @@

Directory Tree

- .
- └── firefox
-     ├── 00-proxy.yml
-     ├── 10-manual.yml
-     └── 20-manual.yml
+ .
+ └── firefox
+     ├── 00-proxy.yml
+     ├── 10-manual.yml
+     └── 20-manual.yml


2 directories, 3 files