From c8bea6ff43bada20665ceef71a8ba8734c45e0ce Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Tue, 4 Nov 2025 19:22:12 +0100 Subject: [PATCH] [tutorial v1.1_025)] A variable with type "port" (config and doc) --- README.md | 80 ++++++++++++++++++++++------------------ config/03/output_ro.html | 6 ++- config/03/output_rw.html | 6 ++- config/04/output_ro.html | 7 ++-- config/04/output_rw.html | 7 ++-- config/05/output_ro.html | 4 +- config/05/output_rw.html | 4 +- 7 files changed, 62 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index b244eb9b..e16f225a 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_023] A variable with type "domainname"](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_023/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_023~1..v1.1_023)) +- [[tutorial v1.1_024] A variable with type's parameters](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_024/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_024~1..v1.1_024)) -# [tutorial v1.1_024)] A variable with type's parameters +# [tutorial v1.1_025)] A variable with type "port" -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_024~1..v1.1_024) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_025~1..v1.1_025) ## Screenshot @@ -52,13 +52,18 @@ manual: # Manual proxy configuration type: domainname params: allow_ip: true + + port: + description: HTTP Port + type: port + default: 8080 ... ``` ### Let's generate the documentation ```console -foo@bar:~$ git switch --detach v1.1_024 +foo@bar:~$ git switch --detach v1.1_025 foo@bar:~$ rougail -m firefox/ -o doc -do github ``` | Variable                                                                                        | Description                                                                                     | @@ -80,18 +85,19 @@ foo@bar:~$ rougail -m firefox/ -o doc -do github | Variable                                                                                            | Description                                                                                         | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **manual.http_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP address.
**Validator**: the domain name can be an IP | +| **manual.http_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP 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 | ### Let's generate the changelog ```console -foo@bar:~$ git switch --detach v1.1_024 +foo@bar:~$ git switch --detach v1.1_025 foo@bar:~$ rougail -m firefox/ -o doc --doc.contents changelog -do github ``` -#### Modified variable +#### New variable -| Variable                                                                                            | Description                                                                                         | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.http_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP address.
**Validator**: the domain name can be an IP | +| Variable                                                                                      | Description                                                                                   | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.http_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP 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 | ## User datas @@ -108,7 +114,7 @@ foo@bar:~$ rougail -m firefox/ -o doc --doc.contents changelog -do github #### Output ```console -foo@bar:~$ git switch --detach v1.1_024 +foo@bar:~$ git switch --detach v1.1_025 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/01/config.yaml ```
🛑 ERRORS
@@ -120,7 +126,7 @@ foo@bar:~$ rougail -m firefox/ -u yaml -ff config/01/config.yaml
 #### Output in read write mode
 
 ```console
-foo@bar:~$ git switch --detach v1.1_024
+foo@bar:~$ git switch --detach v1.1_025
 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/01/config.yaml --cli.read_write
 ```
 
🛑 ERRORS
@@ -142,7 +148,7 @@ proxy_mode: Manual proxy configuration
 #### Output
 
 ```console
-foo@bar:~$ git switch --detach v1.1_024
+foo@bar:~$ git switch --detach v1.1_025
 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/02/config.yaml
 ```
 
🛑 ERRORS
@@ -154,7 +160,7 @@ foo@bar:~$ rougail -m firefox/ -u yaml -ff config/02/config.yaml
 #### Output in read write mode
 
 ```console
-foo@bar:~$ git switch --detach v1.1_024
+foo@bar:~$ git switch --detach v1.1_025
 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/02/config.yaml --cli.read_write
 ```
 
🛑 ERRORS
@@ -179,34 +185,38 @@ manual:
 #### Output
 
 ```console
-foo@bar:~$ git switch --detach v1.1_024
+foo@bar:~$ git switch --detach v1.1_025
 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/03/config.yaml
 ```
 
╭────────────── Caption ───────────────╮
-│ Variable Modified value              │
+│ Variable Default value               │
+│          Modified value              │
 │          (⏳ Original default value) │
 ╰──────────────────────────────────────╯
 Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/03/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/03/config.yaml"
+        ┣━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/03/config.yaml"
+        ┗━━ 📓 HTTP Port: 8080
 
#### Output in read write mode ```console -foo@bar:~$ git switch --detach v1.1_024 +foo@bar:~$ git switch --detach v1.1_025 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/03/config.yaml --cli.read_write ```
╭────────────── Caption ───────────────╮
-│ Variable Modified value              │
+│ Variable Default value               │
+│          Modified value              │
 │          (⏳ Original default value) │
 ╰──────────────────────────────────────╯
 Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/03/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/03/config.yaml"
+        ┣━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/03/config.yaml"
+        ┗━━ 📓 HTTP Port: 8080
 
### Example 4 @@ -225,12 +235,10 @@ manual: #### Output ```console -foo@bar:~$ git switch --detach v1.1_024 +foo@bar:~$ git switch --detach v1.1_025 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/04/config.yaml ``` -
🔔 WARNINGS
-┗━━ variable or family "manual.http_proxy.port" does not exist, it will be ignored when loading from the YAML file "config/04/config.yaml"
-╭────────────── Caption ───────────────╮
+
╭────────────── Caption ───────────────╮
 │ Variable Modified value              │
 │          (⏳ Original default value) │
 ╰──────────────────────────────────────╯
@@ -238,17 +246,16 @@ Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/04/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/04/config.yaml"
+        ┣━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/04/config.yaml"
+        ┗━━ 📓 HTTP Port: 3128 ◀ loaded from the YAML file "config/04/config.yaml" (⏳ 8080)
 
#### Output in read write mode ```console -foo@bar:~$ git switch --detach v1.1_024 +foo@bar:~$ git switch --detach v1.1_025 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/04/config.yaml --cli.read_write ``` -
🔔 WARNINGS
-┗━━ variable or family "manual.http_proxy.port" does not exist, it will be ignored when loading from the YAML file "config/04/config.yaml"
-╭────────────── Caption ───────────────╮
+
╭────────────── Caption ───────────────╮
 │ Variable Modified value              │
 │          (⏳ Original default value) │
 ╰──────────────────────────────────────╯
@@ -256,7 +263,8 @@ Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/04/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/04/config.yaml"
+        ┣━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/04/config.yaml"
+        ┗━━ 📓 HTTP Port: 3128 ◀ loaded from the YAML file "config/04/config.yaml" (⏳ 8080)
 
### Example 5 @@ -278,11 +286,10 @@ manual: #### Output ```console -foo@bar:~$ git switch --detach v1.1_024 +foo@bar:~$ git switch --detach v1.1_025 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/05/config.yaml ```
🔔 WARNINGS
-┣━━ variable or family "manual.http_proxy.port" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ┣━━ variable or family "manual.use_for_https" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ┗━━ variable or family "manual.https_proxy" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ╭────────────── Caption ───────────────╮
@@ -293,16 +300,16 @@ Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/05/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file "config/05/config.yaml"
+        ┣━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file "config/05/config.yaml"
+        ┗━━ 📓 HTTP Port: 3128 ◀ loaded from the YAML file "config/05/config.yaml" (⏳ 8080)
 
#### Output in read write mode ```console -foo@bar:~$ git switch --detach v1.1_024 +foo@bar:~$ git switch --detach v1.1_025 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/05/config.yaml --cli.read_write ```
🔔 WARNINGS
-┣━━ variable or family "manual.http_proxy.port" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ┣━━ variable or family "manual.use_for_https" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ┗━━ variable or family "manual.https_proxy" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ╭────────────── Caption ───────────────╮
@@ -313,8 +320,9 @@ Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/05/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file "config/05/config.yaml"
+        ┣━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file "config/05/config.yaml"
+        ┗━━ 📓 HTTP Port: 3128 ◀ loaded from the YAML file "config/05/config.yaml" (⏳ 8080)
 
-- [[tutorial v1.1_025] A variable with type "port"](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_025/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_025~1..v1.1_025)) +- [[tutorial v1.1_026] A disabled family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_026/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_026~1..v1.1_026)) diff --git a/config/03/output_ro.html b/config/03/output_ro.html index a61c7bcd..f89e24f4 100644 --- a/config/03/output_ro.html +++ b/config/03/output_ro.html @@ -1,10 +1,12 @@
╭────────────── Caption ───────────────╮
-│ Variable Modified value              │
+│ Variable Default value               │
+│          Modified value              │
 │          (⏳ Original default value) │
 ╰──────────────────────────────────────╯
 Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/03/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/03/config.yaml"
+        ┣━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/03/config.yaml"
+        ┗━━ 📓 HTTP Port: 8080
 
diff --git a/config/03/output_rw.html b/config/03/output_rw.html index a61c7bcd..f89e24f4 100644 --- a/config/03/output_rw.html +++ b/config/03/output_rw.html @@ -1,10 +1,12 @@
╭────────────── Caption ───────────────╮
-│ Variable Modified value              │
+│ Variable Default value               │
+│          Modified value              │
 │          (⏳ Original default value) │
 ╰──────────────────────────────────────╯
 Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/03/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/03/config.yaml"
+        ┣━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/03/config.yaml"
+        ┗━━ 📓 HTTP Port: 8080
 
diff --git a/config/04/output_ro.html b/config/04/output_ro.html index c5cb9c06..4d0ae5a0 100644 --- a/config/04/output_ro.html +++ b/config/04/output_ro.html @@ -1,6 +1,4 @@ -
🔔 WARNINGS
-┗━━ variable or family "manual.http_proxy.port" does not exist, it will be ignored when loading from the YAML file "config/04/config.yaml"
-╭────────────── Caption ───────────────╮
+
╭────────────── Caption ───────────────╮
 │ Variable Modified value              │
 │          (⏳ Original default value) │
 ╰──────────────────────────────────────╯
@@ -8,5 +6,6 @@ Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/04/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/04/config.yaml"
+        ┣━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/04/config.yaml"
+        ┗━━ 📓 HTTP Port: 3128 ◀ loaded from the YAML file "config/04/config.yaml" (⏳ 8080)
 
diff --git a/config/04/output_rw.html b/config/04/output_rw.html index c5cb9c06..4d0ae5a0 100644 --- a/config/04/output_rw.html +++ b/config/04/output_rw.html @@ -1,6 +1,4 @@ -
🔔 WARNINGS
-┗━━ variable or family "manual.http_proxy.port" does not exist, it will be ignored when loading from the YAML file "config/04/config.yaml"
-╭────────────── Caption ───────────────╮
+
╭────────────── Caption ───────────────╮
 │ Variable Modified value              │
 │          (⏳ Original default value) │
 ╰──────────────────────────────────────╯
@@ -8,5 +6,6 @@ Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/04/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/04/config.yaml"
+        ┣━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/04/config.yaml"
+        ┗━━ 📓 HTTP Port: 3128 ◀ loaded from the YAML file "config/04/config.yaml" (⏳ 8080)
 
diff --git a/config/05/output_ro.html b/config/05/output_ro.html index 5c570c92..0438b8ae 100644 --- a/config/05/output_ro.html +++ b/config/05/output_ro.html @@ -1,5 +1,4 @@
🔔 WARNINGS
-┣━━ variable or family "manual.http_proxy.port" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ┣━━ variable or family "manual.use_for_https" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ┗━━ variable or family "manual.https_proxy" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ╭────────────── Caption ───────────────╮
@@ -10,5 +9,6 @@ Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/05/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file "config/05/config.yaml"
+        ┣━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file "config/05/config.yaml"
+        ┗━━ 📓 HTTP Port: 3128 ◀ loaded from the YAML file "config/05/config.yaml" (⏳ 8080)
 
diff --git a/config/05/output_rw.html b/config/05/output_rw.html index 5c570c92..0438b8ae 100644 --- a/config/05/output_rw.html +++ b/config/05/output_rw.html @@ -1,5 +1,4 @@
🔔 WARNINGS
-┣━━ variable or family "manual.http_proxy.port" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ┣━━ variable or family "manual.use_for_https" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ┗━━ variable or family "manual.https_proxy" does not exist, it will be ignored when loading from the YAML file "config/05/config.yaml"
 ╭────────────── Caption ───────────────╮
@@ -10,5 +9,6 @@ Variables:
 ┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/05/config.yaml" (⏳ No proxy)
 ┗━━ 📂 Manual proxy configuration
     ┗━━ 📂 HTTP Proxy
-        ┗━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file "config/05/config.yaml"
+        ┣━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file "config/05/config.yaml"
+        ┗━━ 📓 HTTP Port: 3128 ◀ loaded from the YAML file "config/05/config.yaml" (⏳ 8080)