[tutorial v1.1_071] Jinja with a description (config and doc)

This commit is contained in:
egarette@silique.fr 2026-02-17 12:49:06 +01:00
parent 378a6d6642
commit 9f7b64dcf0
11 changed files with 18 additions and 166 deletions

109
README.md
View file

@ -1,11 +1,11 @@
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md) - [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
- [[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_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_070] A conditional hidden family with Jinja # [tutorial v1.1_071] Jinja with a description
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_070~1..v1.1_070) [View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_071~1..v1.1_071)
[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#a-conditional-hidden-family-with-jinja) [Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#jinja-with-a-description)
## Screenshot ## Screenshot
@ -31,7 +31,7 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user-
Then switch to the tutorial page: Then switch to the tutorial page:
```shell ```shell
git switch --detach v1.1_070 git switch --detach v1.1_071
``` ```
## Structure ## Structure
@ -39,11 +39,11 @@ git switch --detach v1.1_070
<p> <p>
<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_071/./">.</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_071/./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_071/./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_071/./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/>     └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_071/./firefox/20-manual.yml">20-manual.yml</a><br/>
<br/><br/></p> <br/><br/></p>
Contents of the firefox/20-manual.yml file Contents of the firefox/20-manual.yml file
@ -64,6 +64,7 @@ manual:
{% if _.use_for_https %} {% if _.use_for_https %}
HTTPS is same has HTTP HTTPS is same has HTTP
{% endif %} {% endif %}
description: in HTTPS case if "_.use_for_https" is set to "true"
dynamic: dynamic:
- HTTPS - HTTPS
- SOCKS - SOCKS
@ -133,7 +134,7 @@ rougail -m firefox/ -o doc
> - manual.*https*_proxy > - manual.*https*_proxy
> - manual.*socks*_proxy\ > - manual.*socks*_proxy\
> *`hidden`*\ > *`hidden`*\
> **Hidden**: depends on a calculation\ > **Hidden**: in HTTPS case if "[Also use this proxy for HTTPS](#manual.use_for_https)" is set to "true"\
> **Identifiers**: > **Identifiers**:
> - HTTPS > - HTTPS
> - SOCKS > - SOCKS
@ -195,90 +196,6 @@ Variables:
- :notebook: version (SOCKS host version used by proxy): <span style="color: #B8860B">v5</span> - :notebook: version (SOCKS host version used by proxy): <span style="color: #B8860B">v5</span>
*** ***
#### Output for "manual.https_proxy"
```shell
rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.root manual.https_proxy
```
> [!NOTE]
>
> **Caption:**
> - Variable
> - <span style="color: #B8860B">Default value</span>
> - <span style="color: #006400">Modified value</span>
> - (:hourglass_flowing_sand: Original default value)
Variables:
- :notebook: address (HTTPS address): <span style="color: #006400">https.proxy.net</span> ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: https.proxy.net ← loaded from the YAML file "config/01/config.yml" :hourglass_flowing_sand: http.proxy.net)
- :notebook: port (HTTPS port): <span style="color: #B8860B">3128</span>
***
### Example 2
#### config/02/config.yml
```yml - [[tutorial v1.1_072] Jinja with a parameter](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_072/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_072~1..v1.1_072))
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
port: 3128
use_for_https: true
https_proxy:
address: https.proxy.net
```
***
#### Output
```shell
rougail -m firefox/ -u yaml -yf config/02/config.yml
```
> [!WARNING]
>
> - manual (Manual proxy configuration)
> - https_proxy (HTTPS Proxy)
> - address (HTTPS address): :bell: <span style="color: #EFBF04">family "https_proxy" (HTTPS Proxy) has property hidden, so cannot access to "address" (HTTPS address), it will be ignored when loading from the YAML file "config/02/config.yml"</span>
> [!NOTE]
>
> **Caption:**
> - Variable
> - <span style="color: #A52A2A">Unmodifiable variable</span>
> - <span style="color: #B8860B">Default value</span>
> - <span style="color: #006400">Modified value</span>
> - (:hourglass_flowing_sand: Original default value)
Variables:
- :notebook: proxy_mode (Configure Proxy Access to the Internet): <span style="color: #006400">Manual proxy configuration</span> ← loaded from the YAML file "config/02/config.yml" (:hourglass_flowing_sand: No proxy)
- :open_file_folder: manual (Manual proxy configuration)
- :open_file_folder: http_proxy (HTTP Proxy)
- :notebook: address (HTTP address): <span style="color: #006400">http.proxy.net</span> ← loaded from the YAML file "config/02/config.yml"
- :notebook: port (HTTP Port): <span style="color: #006400">3128</span> ← loaded from the YAML file "config/02/config.yml" (:hourglass_flowing_sand: 8080)
- :notebook: use_for_https (Also use this proxy for HTTPS): <span style="color: #006400">true</span> ← loaded from the YAML file "config/02/config.yml" (:hourglass_flowing_sand: true)
- :open_file_folder: <span style="color: #A52A2A">https_proxy (HTTPS Proxy)</span>
- :notebook: <span style="color: #A52A2A">address (HTTPS address)</span>: <span style="color: #B8860B">http.proxy.net</span>
- :notebook: <span style="color: #A52A2A">port (HTTPS port)</span>: <span style="color: #B8860B">3128</span>
- :open_file_folder: <span style="color: #A52A2A">socks_proxy (SOCKS Proxy)</span>
- :notebook: <span style="color: #A52A2A">address (SOCKS address)</span>: <span style="color: #B8860B">http.proxy.net</span>
- :notebook: <span style="color: #A52A2A">port (SOCKS port)</span>: <span style="color: #B8860B">3128</span>
- :notebook: <span style="color: #A52A2A">version (SOCKS host version used by proxy)</span>: <span style="color: #B8860B">v5</span>
***
#### Output for "manual.https_proxy"
```shell
rougail -m firefox/ -u yaml -yf config/02/config.yml --cli.root manual.https_proxy
```
> [!CAUTION]
>
> - manual (Manual proxy configuration)
> - https_proxy (HTTPS Proxy)
> - address (HTTPS address): :stop_sign: <span style="color: #C23636">family "https_proxy" (HTTPS Proxy) has property hidden, so cannot access to "address" (HTTPS address), it has been loading from the YAML file "config/02/config.yml"</span>
***
- [[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

@ -1 +0,0 @@
rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.root manual.https_proxy

View file

@ -1,11 +0,0 @@
<pre>╭────────────── Caption ───────────────╮
│ Variable <span style="color: #ffd700">Default value</span>
<span style="color: #00aa00">Modified value</span>
│ (⏳ Original default value) │
╰──────────────────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 address (HTTPS address): <span style="color: #00aa00">https.proxy.net</span> ◀ loaded from the YAML file
<span style="color: #5c5cff"></span>"config/01/config.yml" (⏳ https.proxy.net ◀ loaded from the YAML file
<span style="color: #5c5cff"></span>"config/01/config.yml" ⏳ http.proxy.net)
<span style="color: #5c5cff">┗━━ </span>📓 port (HTTPS port): <span style="color: #ffd700">3128</span>
</pre>

View file

@ -1 +0,0 @@
manual.https_proxy

View file

@ -1 +0,0 @@
rougail -m firefox/ -u yaml -yf config/02/config.yml

View file

@ -1 +0,0 @@
rougail -m firefox/ -u yaml -yf config/02/config.yml --cli.root manual.https_proxy

View file

@ -1,9 +0,0 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
port: 3128
use_for_https: true
https_proxy:
address: https.proxy.net

View file

@ -1,33 +0,0 @@
<pre><span style="font-weight: bold; color: #ffff00">🔔 Warning</span>
<span style="color: #ffff00">┗━━ </span>manual (Manual proxy configuration)
<span style="color: #ffff00"> </span><span style="color: #ffff00">┗━━ </span>https_proxy (HTTPS Proxy)
<span style="color: #ffff00"> </span><span style="color: #ffff00"> </span><span style="color: #ffff00">┗━━ </span>address (HTTPS address): <span style="color: #ffff00">🔔 family "https_proxy" (HTTPS Proxy) has </span>
<span style="color: #ffff00"> </span><span style="color: #ffff00"> </span><span style="color: #ffff00"> </span><span style="color: #ffff00">property hidden, so cannot access to "address" (HTTPS address), it </span>
<span style="color: #ffff00"> </span><span style="color: #ffff00"> </span><span style="color: #ffff00"> </span><span style="color: #ffff00">will be ignored when loading from the YAML file </span>
<span style="color: #ffff00"> </span><span style="color: #ffff00"> </span><span style="color: #ffff00"> </span><span style="color: #ffff00">"config/02/config.yml"</span>
╭───────────────────── Caption ─────────────────────╮
│ Variable <span style="color: #ffd700">Default value</span>
<span style="color: #ffaf00">Unmodifiable variable</span> <span style="color: #00aa00">Modified value</span>
│ (⏳ Original default value) │
╰───────────────────────────────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 proxy_mode (Configure Proxy Access to the Internet): <span style="color: #00aa00">Manual proxy </span>
<span style="color: #5c5cff"></span><span style="color: #00aa00">configuration</span> ◀ loaded from the YAML file "config/02/config.yml" (⏳ No
<span style="color: #5c5cff"></span>proxy)
<span style="color: #5c5cff">┗━━ </span>📂 manual (Manual proxy configuration)
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📂 http_proxy (HTTP Proxy)
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span><span style="color: #5c5cff">┣━━ </span>📓 address (HTTP address): <span style="color: #00aa00">http.proxy.net</span> ◀ loaded from the YAML
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span><span style="color: #5c5cff"></span>file "config/02/config.yml"
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span><span style="color: #5c5cff">┗━━ </span>📓 port (HTTP Port): <span style="color: #00aa00">3128</span> ◀ loaded from the YAML file
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span><span style="color: #5c5cff"> </span>"config/02/config.yml" (⏳ 8080)
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 use_for_https (Also use this proxy for HTTPS): <span style="color: #00aa00">true</span> ◀ loaded from the
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span>YAML file "config/02/config.yml" (⏳ true)
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📂 <span style="color: #ffaf00">https_proxy (HTTPS Proxy)</span>
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span><span style="color: #5c5cff">┣━━ </span>📓 <span style="color: #ffaf00">address (HTTPS address)</span>: <span style="color: #ffd700">http.proxy.net</span>
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span><span style="color: #5c5cff">┗━━ </span>📓 <span style="color: #ffaf00">port (HTTPS port)</span>: <span style="color: #ffd700">3128</span>
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 <span style="color: #ffaf00">socks_proxy (SOCKS Proxy)</span>
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 <span style="color: #ffaf00">address (SOCKS address)</span>: <span style="color: #ffd700">http.proxy.net</span>
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 <span style="color: #ffaf00">port (SOCKS port)</span>: <span style="color: #ffd700">3128</span>
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 <span style="color: #ffaf00">version (SOCKS host version used by proxy)</span>: <span style="color: #ffd700">v5</span>
</pre>

View file

@ -1,7 +0,0 @@
<pre><span style="font-weight: bold; color: #ff0000">🛑 Caution</span>
<span style="color: #ff0000">┗━━ </span>manual (Manual proxy configuration)
<span style="color: #ff0000"> </span><span style="color: #ff0000">┗━━ </span>https_proxy (HTTPS Proxy)
<span style="color: #ff0000"> </span><span style="color: #ff0000"> </span><span style="color: #ff0000">┗━━ </span>address (HTTPS address): <span style="color: #ff0000">🛑 family "https_proxy" (HTTPS Proxy) has </span>
<span style="color: #ff0000"> </span><span style="color: #ff0000"> </span><span style="color: #ff0000"> </span><span style="color: #ff0000">property hidden, so cannot access to "address" (HTTPS address), it </span>
<span style="color: #ff0000"> </span><span style="color: #ff0000"> </span><span style="color: #ff0000"> </span><span style="color: #ff0000">has been loading from the YAML file "config/02/config.yml"</span>
</pre>

View file

@ -1 +0,0 @@
manual.https_proxy

View file

@ -1,7 +1,7 @@
<p> <p>
<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_071/./">.</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_071/./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_071/./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_071/./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/>     └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_071/./firefox/20-manual.yml">20-manual.yml</a><br/>
<br/><br/></p> <br/><br/></p>