From 207ac870e341be8cfc5fdaa46ece5839c96e99cd Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Tue, 2 Dec 2025 16:18:48 +0100 Subject: [PATCH] [tutorial v1.1_070] A conditional hidden family with Jinja (config and doc) --- README.md | 41 ++++++++++++++++------------------------- tree.html | 10 +++++----- 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index e0d1faad..0110f781 100644 --- a/README.md +++ b/README.md @@ -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

-.
- └── 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 @@ -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 @@ -128,7 +131,7 @@ rougail -m firefox/ -o doc > - manual.*https*_proxy > - manual.*socks*_proxy\ > *`hidden`*\ -> **Hidden**: when the variable "[Also use this proxy for HTTPS](#manual.use_for_https)" has the value "true"\ +> **Hidden**: depends on a calculation\ > **Identifiers**: > - HTTPS > - SOCKS @@ -139,18 +142,6 @@ rougail -m firefox/ -o doc | **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 "[HTTP Port](#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" | - - ## User datas ### Example 1 @@ -201,4 +192,4 @@ Variables: -- [[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)) diff --git a/tree.html b/tree.html index 8d4c002d..237dbd2d 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