From f98b4e0b3b562eff388607ad571fb2c8c396a0e6 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 2 Nov 2024 14:58:20 +0100 Subject: [PATCH] [tutorial 024] A variable with type "domainname" (config and doc) --- README.md | 159 ++++++++++++++++++++++++++++++++------- config/01/output_rw.html | 4 + config/02/config.yaml | 2 +- config/02/output_rw.html | 4 + config/03/config.yaml | 3 + config/03/output_ro.html | 13 +++- config/03/output_rw.html | 11 +++ config/04/config.yaml | 6 +- config/04/output_ro.html | 16 ++-- config/04/output_rw.html | 11 +++ config/05/config.yaml | 9 ++- config/05/output_ro.html | 18 +++-- config/05/output_rw.html | 11 +++ 13 files changed, 225 insertions(+), 42 deletions(-) create mode 100644 config/01/output_rw.html create mode 100644 config/02/output_rw.html create mode 100644 config/03/output_rw.html create mode 100644 config/04/output_rw.html create mode 100644 config/05/output_rw.html diff --git a/README.md b/README.md index 18ecd18..22cce07 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 022] A variable inside sub family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_022/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_022~1..v1.1_022)) +- [[tutorial 023] Family type is optional](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 023] Family type is optional +# [tutorial 024] A variable with type "domainname" -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_023~1..v1.1_023) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_024~1..v1.1_024) ## Screenshot @@ -44,6 +44,7 @@ manual: address: description: HTTP address + type: domainname ``` ### Generated documentation @@ -53,17 +54,17 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -o doc -do github ``` ### Variables -| Variable                                                                                        | Description                                                                                     | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **proxy_mode**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.
**Choices**:
- No proxy ← (default)
- Auto-detect proxy settings for this network
- Use system proxy settings
- Manual proxy configuration
- Automatic proxy configuration URL | +| Variable                                                                                            | Description                                                                                         | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **proxy_mode**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.
**Choices**:
- No proxy ← (default)
- Auto-detect proxy settings for this network
- Use system proxy settings
- Manual proxy configuration
- Automatic proxy configuration URL | #### Manual proxy configuration ##### HTTP Proxy -| Variable                                                                                        | Description                                                                                     | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.http_proxy.address**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP address. | +| Variable                                                                                            | Description                                                                                         | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.http_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP address. | ## User data @@ -86,6 +87,16 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/01/config.yaml ┣━━ The following variables are mandatory but have no value: ┗━━ - manual.http_proxy.address (HTTP address) +#### Output in read write mode + +```console +foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/01/config.yaml --exporter.read_write +``` +
🛑 ERRORS
+┣━━ The following variables are mandatory but have no value:
+┗━━   - manual.http_proxy.address (HTTP address)
+
+
### Example 2 #### config/02/config.yaml @@ -93,7 +104,7 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/01/config.yaml ```yml --- -proxy_mode: No proxy +proxy_mode: Manual proxy configuration ``` #### Output @@ -105,6 +116,16 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/02/config.yaml ┣━━ The following variables are mandatory but have no value: ┗━━ - manual.http_proxy.address (HTTP address) +#### Output in read write mode + +```console +foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/02/config.yaml --exporter.read_write +``` +
🛑 ERRORS
+┣━━ The following variables are mandatory but have no value:
+┗━━   - manual.http_proxy.address (HTTP address)
+
+
### Example 3 #### config/03/config.yaml @@ -113,6 +134,9 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/02/config.yaml ```yml --- proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: example.net ``` #### Output @@ -120,9 +144,33 @@ proxy_mode: Manual proxy configuration ```console foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/03/config.yaml ``` -
🛑 ERRORS
-┣━━ The following variables are mandatory but have no value:
-┗━━   - manual.http_proxy.address (HTTP address)
+
╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: example.net
+
+#### Output in read write mode + +```console +foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/03/config.yaml --exporter.read_write +``` +
╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: example.net
+
### Example 4 @@ -131,7 +179,11 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/03/config.yaml ```yml --- -proxy_mode: foo +proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: example.net + port: '3128' ``` #### Output @@ -140,11 +192,34 @@ proxy_mode: foo foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/04/config.yaml ```
🛑 ERRORS
-┣━━ "foo" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only 
-"Auto-detect proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy 
-configuration", "No proxy" and "Use system proxy settings" are allowed
-┣━━ The following variables are mandatory but have no value:
-┗━━   - manual.http_proxy.address (HTTP address)
+┗━━ unknown option "port" in optiondescription "manual.http_proxy" (HTTP Proxy)
+╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: example.net
+
+#### Output in read write mode + +```console +foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/04/config.yaml --exporter.read_write +``` +
╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: example.net
+
### Example 5 @@ -153,7 +228,14 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/04/config.yaml ```yml --- -proxy_mode: 1 +proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: http.proxy.net + port: '3128' + use_for_https: false + https_proxy: + address: https.proxy.net ``` #### Output @@ -162,12 +244,37 @@ proxy_mode: 1 foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/05/config.yaml ```
🛑 ERRORS
-┣━━ "1" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only "Auto-detect
-proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy configuration", 
-"No proxy" and "Use system proxy settings" are allowed
-┣━━ The following variables are mandatory but have no value:
-┗━━   - manual.http_proxy.address (HTTP address)
+┣━━ unknown option "port" in optiondescription "manual.http_proxy" (HTTP Proxy)
+┣━━ unknown option "use_for_https" in optiondescription "manual" (Manual proxy configuration)
+┗━━ unknown option "https_proxy" in optiondescription "manual" (Manual proxy configuration)
+╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: http.proxy.net
+
+#### Output in read write mode + +```console +foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/05/config.yaml --exporter.read_write +``` +
╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: http.proxy.net
+
-- [[tutorial 024] A variable with type "domainname"](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 025] A variable with type's parameters](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)) diff --git a/config/01/output_rw.html b/config/01/output_rw.html new file mode 100644 index 0000000..28450ac --- /dev/null +++ b/config/01/output_rw.html @@ -0,0 +1,4 @@ +
🛑 ERRORS
+┣━━ The following variables are mandatory but have no value:
+┗━━   - manual.http_proxy.address (HTTP address)
+
diff --git a/config/02/config.yaml b/config/02/config.yaml index d914488..74edb22 100644 --- a/config/02/config.yaml +++ b/config/02/config.yaml @@ -1,2 +1,2 @@ --- -proxy_mode: No proxy +proxy_mode: Manual proxy configuration diff --git a/config/02/output_rw.html b/config/02/output_rw.html new file mode 100644 index 0000000..28450ac --- /dev/null +++ b/config/02/output_rw.html @@ -0,0 +1,4 @@ +
🛑 ERRORS
+┣━━ The following variables are mandatory but have no value:
+┗━━   - manual.http_proxy.address (HTTP address)
+
diff --git a/config/03/config.yaml b/config/03/config.yaml index 74edb22..e3db924 100644 --- a/config/03/config.yaml +++ b/config/03/config.yaml @@ -1,2 +1,5 @@ --- proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: example.net diff --git a/config/03/output_ro.html b/config/03/output_ro.html index 28450ac..9ea732e 100644 --- a/config/03/output_ro.html +++ b/config/03/output_ro.html @@ -1,4 +1,11 @@ -
🛑 ERRORS
-┣━━ The following variables are mandatory but have no value:
-┗━━   - manual.http_proxy.address (HTTP address)
+
╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: example.net
 
diff --git a/config/03/output_rw.html b/config/03/output_rw.html new file mode 100644 index 0000000..9ea732e --- /dev/null +++ b/config/03/output_rw.html @@ -0,0 +1,11 @@ +
╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: example.net
+
diff --git a/config/04/config.yaml b/config/04/config.yaml index e3fa25d..c8d73af 100644 --- a/config/04/config.yaml +++ b/config/04/config.yaml @@ -1,2 +1,6 @@ --- -proxy_mode: foo +proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: example.net + port: '3128' diff --git a/config/04/output_ro.html b/config/04/output_ro.html index 082c874..b07fec9 100644 --- a/config/04/output_ro.html +++ b/config/04/output_ro.html @@ -1,7 +1,13 @@
🛑 ERRORS
-┣━━ "foo" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only 
-"Auto-detect proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy 
-configuration", "No proxy" and "Use system proxy settings" are allowed
-┣━━ The following variables are mandatory but have no value:
-┗━━   - manual.http_proxy.address (HTTP address)
+┗━━ unknown option "port" in optiondescription "manual.http_proxy" (HTTP Proxy)
+╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: example.net
 
diff --git a/config/04/output_rw.html b/config/04/output_rw.html new file mode 100644 index 0000000..9ea732e --- /dev/null +++ b/config/04/output_rw.html @@ -0,0 +1,11 @@ +
╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: example.net
+
diff --git a/config/05/config.yaml b/config/05/config.yaml index bf6f64c..4a1f789 100644 --- a/config/05/config.yaml +++ b/config/05/config.yaml @@ -1,2 +1,9 @@ --- -proxy_mode: 1 +proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: http.proxy.net + port: '3128' + use_for_https: false + https_proxy: + address: https.proxy.net diff --git a/config/05/output_ro.html b/config/05/output_ro.html index 3c3b276..4f8e0ee 100644 --- a/config/05/output_ro.html +++ b/config/05/output_ro.html @@ -1,7 +1,15 @@
🛑 ERRORS
-┣━━ "1" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only "Auto-detect
-proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy configuration", 
-"No proxy" and "Use system proxy settings" are allowed
-┣━━ The following variables are mandatory but have no value:
-┗━━   - manual.http_proxy.address (HTTP address)
+┣━━ unknown option "port" in optiondescription "manual.http_proxy" (HTTP Proxy)
+┣━━ unknown option "use_for_https" in optiondescription "manual" (Manual proxy configuration)
+┗━━ unknown option "https_proxy" in optiondescription "manual" (Manual proxy configuration)
+╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: http.proxy.net
 
diff --git a/config/05/output_rw.html b/config/05/output_rw.html new file mode 100644 index 0000000..f810fdc --- /dev/null +++ b/config/05/output_rw.html @@ -0,0 +1,11 @@ +
╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┗━━ 📓 address: http.proxy.net
+