From 07777d9efe694ddaa33bd2016152afe24ba39447 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 18 Apr 2026 21:47:41 +0200 Subject: [PATCH] [tutorial v1.1_082] Redefine default value in custom type variable (config and doc) --- CHANGELOG.md | 23 ++++++----------- DOCUMENTATION.md | 18 +++++++------- README.md | 53 ++++++++++++++++++++++++++-------------- config/01/output_ro.html | 29 +++++++++++++++++++--- tree.html | 16 ++++++------ 5 files changed, 84 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 549f4198..1828d30a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,8 @@ -# New variables +# Modified variables -| Variable | Description | -|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.https_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.
**Validators**:
• type domainname
• the domain name can be an IP | -| **manual.https_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy 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**: 8080 | -| **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.
**Validators**:
• type domainname
• the domain name can be an IP | -| **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy 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**: 8080 | -| **manual.socks_proxy.version**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | SOCKS host version used by proxy.
**Choices**:
• v4
• v5 **← (default)** | - -# Deleted variables - -- manual.*https*_proxy.address -- manual.*socks*_proxy.address -- manual.*https*_proxy.port -- manual.*socks*_proxy.port -- manual.*socks*_proxy.version +| Variable | Description | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.https_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[Proxy address](#manual.http_proxy.address)". | +| **manual.https_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy 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**: ~~8080~~
the value of the variable "[Proxy port](#manual.http_proxy.port)". | +| **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[Proxy address](#manual.http_proxy.address)". | +| **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy 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**: ~~8080~~
the value of the variable "[Proxy port](#manual.http_proxy.port)". | diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 7a359c80..ce6a657f 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -33,10 +33,10 @@ > *`hidden`*\ > **Hidden**: when the variable "[Also use this proxy for HTTPS](#manual.use_for_https)" has the value "true". -| Variable | Description | -|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.https_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.
**Validators**:
• type domainname
• the domain name can be an IP | -| **manual.https_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy 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**: 8080 | +| Variable | Description | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.https_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[Proxy address](#manual.http_proxy.address)". | +| **manual.https_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy 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 "[Proxy port](#manual.http_proxy.port)". | ## SOCKS Proxy @@ -44,8 +44,8 @@ > > **Path**: manual.socks_proxy -| Variable | Description | -|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.
**Validators**:
• type domainname
• the domain name can be an IP | -| **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy 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**: 8080 | -| **manual.socks_proxy.version**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | SOCKS host version used by proxy.
**Choices**:
• v4
• v5 **← (default)** | +| Variable | Description | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[Proxy address](#manual.http_proxy.address)". | +| **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy 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 "[Proxy port](#manual.http_proxy.port)". | +| **manual.socks_proxy.version**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | SOCKS host version used by proxy.
**Choices**:
• v4
• v5 **← (default)** | diff --git a/README.md b/README.md index 9d79d2ca..3be3c71a 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_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

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


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] -> -> - manual (Manual proxy configuration) -> - socks_proxy (SOCKS Proxy) -> - address (Proxy address): :stop_sign: mandatory variable but has no value +> [!NOTE] +> +> **Caption:** +> - Variable +> - Default value +> - Modified value +> - (:hourglass_flowing_sand: Original default value) + +Variables: +- :notebook: proxy_mode (Configure Proxy Access to the Internet): Manual proxy configuration ← 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): http.proxy.net ← loaded from the YAML file "config/01/config.yml" + - :notebook: port (Proxy port): 3128 ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: 8080) + - :notebook: use_for_https (Also use this proxy for HTTPS): false ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: true) + - :open_file_folder: https_proxy (HTTPS Proxy) + - :notebook: address (Proxy address): https.proxy.net ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: http.proxy.net) + - :notebook: port (Proxy port): 3128 + - :open_file_folder: socks_proxy (SOCKS Proxy) + - :notebook: address (Proxy address): http.proxy.net + - :notebook: port (Proxy port): 3128 + - :notebook: version (SOCKS host version used by proxy): v5 *** -- [[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)) diff --git a/config/01/output_ro.html b/config/01/output_ro.html index 26749f46..0c5eaa66 100644 --- a/config/01/output_ro.html +++ b/config/01/output_ro.html @@ -1,5 +1,26 @@ -
🛑 Caution
-┗━━ manual (Manual proxy configuration)
-    ┗━━ socks_proxy (SOCKS Proxy)
-        ┗━━ address (Proxy address): 🛑 mandatory variable but has no value
+
╭────────────── Caption ───────────────╮
+│ Variable Default value               │
+│          Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode (Configure Proxy Access to the Internet): Manual proxy 
+configuration ◀ loaded from the YAML file "config/01/config.yml" (⏳ No 
+proxy)
+┗━━ 📂 manual (Manual proxy configuration)
+    ┣━━ 📂 http_proxy (HTTP Proxy)
+    ┣━━ 📓 address (Proxy address): http.proxy.net ◀ loaded from the YAML 
+    file "config/01/config.yml"
+    ┗━━ 📓 port (Proxy port): 3128 ◀ loaded from the YAML file 
+        "config/01/config.yml" (⏳ 8080)
+    ┣━━ 📓 use_for_https (Also use this proxy for HTTPS): false ◀ loaded from 
+    the YAML file "config/01/config.yml" (⏳ true)
+    ┣━━ 📂 https_proxy (HTTPS Proxy)
+    ┣━━ 📓 address (Proxy address): https.proxy.net ◀ loaded from the YAML 
+    file "config/01/config.yml" (⏳ http.proxy.net)
+    ┗━━ 📓 port (Proxy port): 3128
+    ┗━━ 📂 socks_proxy (SOCKS Proxy)
+        ┣━━ 📓 address (Proxy address): http.proxy.net
+        ┣━━ 📓 port (Proxy port): 3128
+        ┗━━ 📓 version (SOCKS host version used by proxy): v5
 
diff --git a/tree.html b/tree.html index d1bd476c..26596cad 100644 --- a/tree.html +++ b/tree.html @@ -1,10 +1,10 @@

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


\ No newline at end of file