[tutorial v1.1_082] Redefine default value in custom type variable (config and doc)

This commit is contained in:
egarette@silique.fr 2026-04-18 21:47:41 +02:00
parent f4f8bd3475
commit 07777d9efe
5 changed files with 84 additions and 55 deletions

View file

@ -1,17 +1,8 @@
# New variables
# Modified variables
| Variable | Description |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="manual.https_proxy.address" name="manual.https_proxy.address">manual.https_proxy.address</a>**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.<br/>**Validators**: <br/>&nbsp;type domainname<br/>&nbsp;the domain name can be an IP |
| **<a id="manual.https_proxy.port" name="manual.https_proxy.port">manual.https_proxy.port</a>**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy port.<br/>**Validators**: <br/>&nbsp;well-known ports (1 to 1023) are allowed<br/>&nbsp;registred ports (1024 to 49151) are allowed<br/>&nbsp;private ports (greater than 49152) are allowed<br/>**Default**: 8080 |
| **<a id="manual.socks_proxy.address" name="manual.socks_proxy.address">manual.socks_proxy.address</a>**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.<br/>**Validators**: <br/>&nbsp;type domainname<br/>&nbsp;the domain name can be an IP |
| **<a id="manual.socks_proxy.port" name="manual.socks_proxy.port">manual.socks_proxy.port</a>**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy port.<br/>**Validators**: <br/>&nbsp;well-known ports (1 to 1023) are allowed<br/>&nbsp;registred ports (1024 to 49151) are allowed<br/>&nbsp;private ports (greater than 49152) are allowed<br/>**Default**: 8080 |
| **<a id="manual.socks_proxy.version" name="manual.socks_proxy.version">manual.socks_proxy.version</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | SOCKS host version used by proxy.<br/>**Choices**: <br/>&nbsp;v4<br/>&nbsp;v5 **← (default)** |
# Deleted variables
- manual.*https*_proxy.address
- manual.*socks*_proxy.address
- manual.*https*_proxy.port
- manual.*socks*_proxy.port
- manual.*socks*_proxy.version
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="manual.https_proxy.address" name="manual.https_proxy.address">manual.https_proxy.address</a>**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.<br/>**Validators**: <br/>&nbsp;type domainname<br/>&nbsp;the domain name can be an IP<br/>**Default**: <ins>the value of the variable "[Proxy address](#manual.http_proxy.address)".</ins> |
| **<a id="manual.https_proxy.port" name="manual.https_proxy.port">manual.https_proxy.port</a>**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy port.<br/>**Validators**: <br/>&nbsp;well-known ports (1 to 1023) are allowed<br/>&nbsp;registred ports (1024 to 49151) are allowed<br/>&nbsp;private ports (greater than 49152) are allowed<br/>**Default**: ~~8080~~<br/><ins>the value of the variable "[Proxy port](#manual.http_proxy.port)".</ins> |
| **<a id="manual.socks_proxy.address" name="manual.socks_proxy.address">manual.socks_proxy.address</a>**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.<br/>**Validators**: <br/>&nbsp;type domainname<br/>&nbsp;the domain name can be an IP<br/>**Default**: <ins>the value of the variable "[Proxy address](#manual.http_proxy.address)".</ins> |
| **<a id="manual.socks_proxy.port" name="manual.socks_proxy.port">manual.socks_proxy.port</a>**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy port.<br/>**Validators**: <br/>&nbsp;well-known ports (1 to 1023) are allowed<br/>&nbsp;registred ports (1024 to 49151) are allowed<br/>&nbsp;private ports (greater than 49152) are allowed<br/>**Default**: ~~8080~~<br/><ins>the value of the variable "[Proxy port](#manual.http_proxy.port)".</ins> |

View file

@ -34,9 +34,9 @@
> **Hidden**: when the variable "[Also use this proxy for HTTPS](#manual.use_for_https)" has the value "true".
| Variable | Description |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="manual.https_proxy.address" name="manual.https_proxy.address">manual.https_proxy.address</a>**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.<br/>**Validators**: <br/>&nbsp;type domainname<br/>&nbsp;the domain name can be an IP |
| **<a id="manual.https_proxy.port" name="manual.https_proxy.port">manual.https_proxy.port</a>**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy port.<br/>**Validators**: <br/>&nbsp;well-known ports (1 to 1023) are allowed<br/>&nbsp;registred ports (1024 to 49151) are allowed<br/>&nbsp;private ports (greater than 49152) are allowed<br/>**Default**: 8080 |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="manual.https_proxy.address" name="manual.https_proxy.address">manual.https_proxy.address</a>**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.<br/>**Validators**: <br/>&nbsp;type domainname<br/>&nbsp;the domain name can be an IP<br/>**Default**: the value of the variable "[Proxy address](#manual.http_proxy.address)". |
| **<a id="manual.https_proxy.port" name="manual.https_proxy.port">manual.https_proxy.port</a>**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy port.<br/>**Validators**: <br/>&nbsp;well-known ports (1 to 1023) are allowed<br/>&nbsp;registred ports (1024 to 49151) are allowed<br/>&nbsp;private ports (greater than 49152) are allowed<br/>**Default**: the value of the variable "[Proxy port](#manual.http_proxy.port)". |
## SOCKS Proxy
@ -45,7 +45,7 @@
> **Path**: manual.socks_proxy
| Variable | Description |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="manual.socks_proxy.address" name="manual.socks_proxy.address">manual.socks_proxy.address</a>**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.<br/>**Validators**: <br/>&nbsp;type domainname<br/>&nbsp;the domain name can be an IP |
| **<a id="manual.socks_proxy.port" name="manual.socks_proxy.port">manual.socks_proxy.port</a>**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy port.<br/>**Validators**: <br/>&nbsp;well-known ports (1 to 1023) are allowed<br/>&nbsp;registred ports (1024 to 49151) are allowed<br/>&nbsp;private ports (greater than 49152) are allowed<br/>**Default**: 8080 |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="manual.socks_proxy.address" name="manual.socks_proxy.address">manual.socks_proxy.address</a>**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.<br/>**Validators**: <br/>&nbsp;type domainname<br/>&nbsp;the domain name can be an IP<br/>**Default**: the value of the variable "[Proxy address](#manual.http_proxy.address)". |
| **<a id="manual.socks_proxy.port" name="manual.socks_proxy.port">manual.socks_proxy.port</a>**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy port.<br/>**Validators**: <br/>&nbsp;well-known ports (1 to 1023) are allowed<br/>&nbsp;registred ports (1024 to 49151) are allowed<br/>&nbsp;private ports (greater than 49152) are allowed<br/>**Default**: the value of the variable "[Proxy port](#manual.http_proxy.port)". |
| **<a id="manual.socks_proxy.version" name="manual.socks_proxy.version">manual.socks_proxy.version</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | SOCKS host version used by proxy.<br/>**Choices**: <br/>&nbsp;v4<br/>&nbsp;v5 **← (default)** |

View file

@ -1,9 +1,9 @@
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
- [[tutorial v1.1_080] Proxy custom type](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_080/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_081~1..v1.1_081))
- [[tutorial v1.1_081] Add a variable in a family with custom type](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_082~1..v1.1_082))
# [tutorial v1.1_081] Add a variable in a family with custom type
# [tutorial v1.1_082] Redefine default value in custom type variable
[Read the tutorial "Add a variable in a family with custom type" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#add-a-variable-in-a-family-with-custom-type)
[Read the tutorial "Redefine default value in custom type variable" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#redefine-default-value-in-custom-type-variable)
## Screenshot
@ -25,20 +25,20 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user-
Then switch to the tutorial page:
```shell
git switch --detach v1.1_081
git switch --detach v1.1_082
```
## Structure
<p>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./">.</a><br/>
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./firefox/">firefox</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./firefox/10-manual.yml">10-manual.yml</a><br/>
│   └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./firefox/20-manual.yml">20-manual.yml</a><br/>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./types/">types</a><br/>
    └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./types/proxy/">proxy</a><br/>
        └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./types/proxy/00-type.yml">00-type.yml</a><br/>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./">.</a><br/>
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./firefox/">firefox</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./firefox/10-manual.yml">10-manual.yml</a><br/>
│   └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./firefox/20-manual.yml">20-manual.yml</a><br/>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./types/">types</a><br/>
    └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./types/proxy/">proxy</a><br/>
        └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./types/proxy/00-type.yml">00-type.yml</a><br/>
<br/><br/></p>
Contents of the firefox/20-manual.yml file
@ -115,13 +115,30 @@ manual:
```shell
rougail -m firefox/ --types types/proxy -u yaml -yf config/01/config.yml
```
> [!CAUTION]
> [!NOTE]
>
> - manual (Manual proxy configuration)
> - socks_proxy (SOCKS Proxy)
> - address (Proxy address): :stop_sign: <span style="color: #C23636">mandatory variable but has no value</span>
> **Caption:**
> - Variable
> - <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/01/config.yml" (:hourglass_flowing_sand: No proxy)
- :open_file_folder: manual (Manual proxy configuration)
- :open_file_folder: http_proxy (HTTP Proxy)
- :notebook: address (Proxy address): <span style="color: #006400">http.proxy.net</span> ← loaded from the YAML file "config/01/config.yml"
- :notebook: port (Proxy port): <span style="color: #006400">3128</span> ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: 8080)
- :notebook: use_for_https (Also use this proxy for HTTPS): <span style="color: #006400">false</span> ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: true)
- :open_file_folder: https_proxy (HTTPS Proxy)
- :notebook: address (Proxy address): <span style="color: #006400">https.proxy.net</span> ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: http.proxy.net)
- :notebook: port (Proxy port): <span style="color: #B8860B">3128</span>
- :open_file_folder: socks_proxy (SOCKS Proxy)
- :notebook: address (Proxy address): <span style="color: #B8860B">http.proxy.net</span>
- :notebook: port (Proxy port): <span style="color: #B8860B">3128</span>
- :notebook: version (SOCKS host version used by proxy): <span style="color: #B8860B">v5</span>
***
- [[tutorial v1.1_082] Redefine default value in custom type variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_082~1..v1.1_082))
- [[tutorial v1.1_083] Redefine other parameter in custom type](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_083/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_083~1..v1.1_083))

View file

@ -1,5 +1,26 @@
<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>socks_proxy (SOCKS Proxy)
<span style="color: #ff0000"> </span><span style="color: #ff0000"> </span><span style="color: #ff0000">┗━━ </span>address (Proxy address): <span style="color: #ff0000">🛑 mandatory variable but has no value</span>
<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>📓 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/01/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 (Proxy 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/01/config.yml"
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span><span style="color: #5c5cff">┗━━ </span>📓 port (Proxy 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/01/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">false</span> ◀ loaded from
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span>the YAML file "config/01/config.yml" (⏳ true)
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📂 https_proxy (HTTPS Proxy)
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span><span style="color: #5c5cff">┣━━ </span>📓 address (Proxy address): <span style="color: #00aa00">https.proxy.net</span> ◀ loaded from the YAML
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span><span style="color: #5c5cff"></span>file "config/01/config.yml" (⏳ http.proxy.net)
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"></span><span style="color: #5c5cff">┗━━ </span>📓 port (Proxy port): <span style="color: #ffd700">3128</span>
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 socks_proxy (SOCKS Proxy)
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 address (Proxy address): <span style="color: #ffd700">http.proxy.net</span>
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 port (Proxy port): <span style="color: #ffd700">3128</span>
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 version (SOCKS host version used by proxy): <span style="color: #ffd700">v5</span>
</pre>

View file

@ -1,10 +1,10 @@
<p>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./">.</a><br/>
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./firefox/">firefox</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./firefox/10-manual.yml">10-manual.yml</a><br/>
│   └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./firefox/20-manual.yml">20-manual.yml</a><br/>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./types/">types</a><br/>
    └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./types/proxy/">proxy</a><br/>
        └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/./types/proxy/00-type.yml">00-type.yml</a><br/>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./">.</a><br/>
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./firefox/">firefox</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./firefox/10-manual.yml">10-manual.yml</a><br/>
│   └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./firefox/20-manual.yml">20-manual.yml</a><br/>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./types/">types</a><br/>
    └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./types/proxy/">proxy</a><br/>
        └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/./types/proxy/00-type.yml">00-type.yml</a><br/>
<br/><br/></p>