diff --git a/README.md b/README.md index c556780..8e8794d 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 026] A variable with type "port"](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)) +- [[tutorial 027] A disabled family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_027/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_027~1..v1.1_027)) -# [tutorial 027] A disabled family +# [tutorial 028] A conditional disabled family with a variable -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_027~1..v1.1_027) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_028~1..v1.1_028) ## Screenshot @@ -38,7 +38,10 @@ proxy_mode: --- manual: description: Manual proxy configuration - disabled: true + disabled: + type: variable + variable: proxy_mode + when_not: 'Manual proxy configuration' http_proxy: description: HTTP Proxy @@ -62,9 +65,22 @@ 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 + +_`disabled`_ + +**Disabled**: proxy_mode. + +##### HTTP Proxy + +| 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.
**Default**: 8080 | ## User data @@ -121,26 +137,18 @@ proxy_mode: Manual proxy configuration ```console foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/02/config.yaml ``` -
╭────────────────────────── Caption ──────────────────────────╮
-│ Variable                           Default value            │
-│ Undocumented variable              Modified value           │
-│ Undocumented but modified variable (Original default value) │
-╰─────────────────────────────────────────────────────────────╯
-Variables:
-┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+
🛑 ERRORS
+┣━━ 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 ``` -
╭────────────────────────── Caption ──────────────────────────╮
-│ Variable                           Default value            │
-│ Undocumented variable              Modified value           │
-│ Undocumented but modified variable (Original default value) │
-╰─────────────────────────────────────────────────────────────╯
-Variables:
-┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+
🛑 ERRORS
+┣━━ The following variables are mandatory but have no value:
+┗━━   - manual.http_proxy.address (HTTP address)
 
### Example 3 @@ -161,15 +169,17 @@ manual: ```console foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/03/config.yaml ``` -
🛑 ERRORS
-┗━━ cannot access to optiondescription "manual" (Manual proxy configuration) because has property "disabled"
-╭────────────────────────── Caption ──────────────────────────╮
+
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
 │ Undocumented variable              Modified value           │
 │ Undocumented but modified variable (Original default value) │
 ╰─────────────────────────────────────────────────────────────╯
 Variables:
-┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┣━━ 📓 address: example.net
+        ┗━━ 📓 port: 8080
 
#### Output in read write mode @@ -182,7 +192,11 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/03/config.yaml --export │ Undocumented but modified variable (Original default value) │ ╰─────────────────────────────────────────────────────────────╯ Variables: -┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┗━━ 📂 manual + ┗━━ 📂 http_proxy + ┣━━ 📓 address: example.net + ┗━━ 📓 port: 8080
### Example 4 @@ -204,16 +218,17 @@ manual: ```console foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/04/config.yaml ``` -
🛑 ERRORS
-┣━━ cannot access to optiondescription "manual" (Manual proxy configuration) because has property "disabled"
-┗━━ cannot access to optiondescription "manual" (Manual proxy configuration) because has property "disabled"
-╭────────────────────────── Caption ──────────────────────────╮
+
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
 │ Undocumented variable              Modified value           │
 │ Undocumented but modified variable (Original default value) │
 ╰─────────────────────────────────────────────────────────────╯
 Variables:
-┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┣━━ 📓 address: example.net
+        ┗━━ 📓 port: 3128 (8080)
 
#### Output in read write mode @@ -226,7 +241,11 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/04/config.yaml --export │ Undocumented but modified variable (Original default value) │ ╰─────────────────────────────────────────────────────────────╯ Variables: -┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┗━━ 📂 manual + ┗━━ 📂 http_proxy + ┣━━ 📓 address: example.net + ┗━━ 📓 port: 3128 (8080)
### Example 5 @@ -252,8 +271,6 @@ manual: foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/05/config.yaml ```
🛑 ERRORS
-┣━━ cannot access to optiondescription "manual" (Manual proxy configuration) because has property "disabled"
-┣━━ cannot access to optiondescription "manual" (Manual proxy configuration) because has property "disabled"
 ┣━━ unknown option "use_for_https" in optiondescription "manual" (Manual proxy configuration)
 ┗━━ unknown option "https_proxy" in optiondescription "manual" (Manual proxy configuration)
 ╭────────────────────────── Caption ──────────────────────────╮
@@ -262,7 +279,11 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/05/config.yaml
 │ Undocumented but modified variable (Original default value) │
 ╰─────────────────────────────────────────────────────────────╯
 Variables:
-┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┣━━ 📓 address: http.proxy.net
+        ┗━━ 📓 port: 3128 (8080)
 
#### Output in read write mode @@ -275,9 +296,13 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/05/config.yaml --export │ Undocumented but modified variable (Original default value) │ ╰─────────────────────────────────────────────────────────────╯ Variables: -┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┗━━ 📂 manual + ┗━━ 📂 http_proxy + ┣━━ 📓 address: http.proxy.net + ┗━━ 📓 port: 3128 (8080)
-- [[tutorial 028] A conditional disabled family with a variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_028/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_028~1..v1.1_028)) +- [[tutorial 029] Type variable is optional](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_029/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_029~1..v1.1_029)) diff --git a/config/02/output_ro.html b/config/02/output_ro.html index 4c097ea..28450ac 100644 --- a/config/02/output_ro.html +++ b/config/02/output_ro.html @@ -1,8 +1,4 @@ -
╭────────────────────────── Caption ──────────────────────────╮
-│ Variable                           Default value            │
-│ Undocumented variable              Modified value           │
-│ Undocumented but modified variable (Original default value) │
-╰─────────────────────────────────────────────────────────────╯
-Variables:
-┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+
🛑 ERRORS
+┣━━ The following variables are mandatory but have no value:
+┗━━   - manual.http_proxy.address (HTTP address)
 
diff --git a/config/02/output_rw.html b/config/02/output_rw.html index 4c097ea..28450ac 100644 --- a/config/02/output_rw.html +++ b/config/02/output_rw.html @@ -1,8 +1,4 @@ -
╭────────────────────────── Caption ──────────────────────────╮
-│ Variable                           Default value            │
-│ Undocumented variable              Modified value           │
-│ Undocumented but modified variable (Original default value) │
-╰─────────────────────────────────────────────────────────────╯
-Variables:
-┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+
🛑 ERRORS
+┣━━ The following variables are mandatory but have no value:
+┗━━   - manual.http_proxy.address (HTTP address)
 
diff --git a/config/03/output_ro.html b/config/03/output_ro.html index 98e6cee..9a3ff4f 100644 --- a/config/03/output_ro.html +++ b/config/03/output_ro.html @@ -1,10 +1,12 @@ -
🛑 ERRORS
-┗━━ cannot access to optiondescription "manual" (Manual proxy configuration) because has property "disabled"
-╭────────────────────────── Caption ──────────────────────────╮
+
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
 │ Undocumented variable              Modified value           │
 │ Undocumented but modified variable (Original default value) │
 ╰─────────────────────────────────────────────────────────────╯
 Variables:
-┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┣━━ 📓 address: example.net
+        ┗━━ 📓 port: 8080
 
diff --git a/config/03/output_rw.html b/config/03/output_rw.html index 4c097ea..9a3ff4f 100644 --- a/config/03/output_rw.html +++ b/config/03/output_rw.html @@ -4,5 +4,9 @@ │ Undocumented but modified variable (Original default value) │ ╰─────────────────────────────────────────────────────────────╯ Variables: -┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┗━━ 📂 manual + ┗━━ 📂 http_proxy + ┣━━ 📓 address: example.net + ┗━━ 📓 port: 8080
diff --git a/config/04/output_ro.html b/config/04/output_ro.html index 57c06eb..56d3640 100644 --- a/config/04/output_ro.html +++ b/config/04/output_ro.html @@ -1,11 +1,12 @@ -
🛑 ERRORS
-┣━━ cannot access to optiondescription "manual" (Manual proxy configuration) because has property "disabled"
-┗━━ cannot access to optiondescription "manual" (Manual proxy configuration) because has property "disabled"
-╭────────────────────────── Caption ──────────────────────────╮
+
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
 │ Undocumented variable              Modified value           │
 │ Undocumented but modified variable (Original default value) │
 ╰─────────────────────────────────────────────────────────────╯
 Variables:
-┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┣━━ 📓 address: example.net
+        ┗━━ 📓 port: 3128 (8080)
 
diff --git a/config/04/output_rw.html b/config/04/output_rw.html index 4c097ea..56d3640 100644 --- a/config/04/output_rw.html +++ b/config/04/output_rw.html @@ -4,5 +4,9 @@ │ Undocumented but modified variable (Original default value) │ ╰─────────────────────────────────────────────────────────────╯ Variables: -┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┗━━ 📂 manual + ┗━━ 📂 http_proxy + ┣━━ 📓 address: example.net + ┗━━ 📓 port: 3128 (8080)
diff --git a/config/05/output_ro.html b/config/05/output_ro.html index 0a2c978..984844a 100644 --- a/config/05/output_ro.html +++ b/config/05/output_ro.html @@ -1,6 +1,4 @@
🛑 ERRORS
-┣━━ cannot access to optiondescription "manual" (Manual proxy configuration) because has property "disabled"
-┣━━ cannot access to optiondescription "manual" (Manual proxy configuration) because has property "disabled"
 ┣━━ unknown option "use_for_https" in optiondescription "manual" (Manual proxy configuration)
 ┗━━ unknown option "https_proxy" in optiondescription "manual" (Manual proxy configuration)
 ╭────────────────────────── Caption ──────────────────────────╮
@@ -9,5 +7,9 @@
 │ Undocumented but modified variable (Original default value) │
 ╰─────────────────────────────────────────────────────────────╯
 Variables:
-┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
+┗━━ 📂 manual
+    ┗━━ 📂 http_proxy
+        ┣━━ 📓 address: http.proxy.net
+        ┗━━ 📓 port: 3128 (8080)
 
diff --git a/config/05/output_rw.html b/config/05/output_rw.html index 4c097ea..ec2ef0c 100644 --- a/config/05/output_rw.html +++ b/config/05/output_rw.html @@ -4,5 +4,9 @@ │ Undocumented but modified variable (Original default value) │ ╰─────────────────────────────────────────────────────────────╯ Variables: -┗━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) +┗━━ 📂 manual + ┗━━ 📂 http_proxy + ┣━━ 📓 address: http.proxy.net + ┗━━ 📓 port: 3128 (8080)