From b3c4db2edcd9204dc2f6341285b11deb3f9f32cc Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 9 Nov 2025 19:31:06 +0100 Subject: [PATCH] [tutorial v1.1_002)] Describe the variable (config and doc) --- README.md | 50 +++++++++++++++-------------------- config/01/output_ro.html | 2 +- config/01/output_rw.html | 2 +- config/02/output_ro.html | 2 +- config/03/cmd_invalid.txt | 1 - config/03/config.yml | 2 +- config/03/output_invalid.html | 3 --- config/03/output_ro.html | 10 +++---- tree.html | 6 ++--- 9 files changed, 33 insertions(+), 45 deletions(-) delete mode 100644 config/03/cmd_invalid.txt delete mode 100644 config/03/output_invalid.html diff --git a/README.md b/README.md index 2c6ab925..c3a67cb1 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_000] An empty structured file with format version](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_000/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_000~1..v1.1_000)) +- [[tutorial v1.1_001] A first variable with only a name](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_001/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_001~1..v1.1_001)) -# [tutorial v1.1_001)] A first variable with only a name +# [tutorial v1.1_002)] Describe the variable -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_001~1..v1.1_001) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_002~1..v1.1_002) ## Screenshot @@ -29,7 +29,7 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user- Then switch to the tutorial page: ```shell -git switch --detach v1.1_001 +git switch --detach v1.1_002 ``` ## Structure @@ -37,9 +37,9 @@ git switch --detach v1.1_001

-.
- └── firefox
-     └── 00-proxy.yml
+.
+ └── firefox
+     └── 00-proxy.yml


Contents of the firefox/00-proxy.yml file @@ -49,7 +49,7 @@ Contents of the firefox/00-proxy.yml file --- version: 1.1 -proxy_mode: +proxy_mode: # Configure Proxy Access to the Internet ... ``` @@ -60,18 +60,18 @@ rougail -m firefox/ -o doc ``` | Variable                                                                                        | Description                                                                                     | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | | +| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet. | ### Let's generate the changelog ```shell rougail -m firefox/ -o doc --doc.contents changelog ``` -#### New variable +#### Modified variable | Variable                                                                                        | Description                                                                                     | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | | +| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet. | ## User datas @@ -91,7 +91,7 @@ rougail -m firefox/ -u yaml -yf config/01/config.yml ```
🛑 ERRORS
 ┗━━ The following variables are mandatory but have no value:
-    ┗━━ proxy_mode
+    ┗━━ Configure Proxy Access to the Internet
 
#### Output in read write mode @@ -102,7 +102,7 @@ rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.read_write │ Variable Default value │ ╰────────────────────────╯ Variables: -┗━━ 📓 proxy_mode: null +┗━━ 📓 Configure Proxy Access to the Internet: null ### Example 2 @@ -122,7 +122,7 @@ rougail -m firefox/ -u yaml -yf config/02/config.yml │ Variable Modified value │ ╰─────────────────────────╯ Variables: -┗━━ 📓 proxy_mode: No proxy ◀ loaded from the YAML file "config/02/config.yml" +┗━━ 📓 Configure Proxy Access to the Internet: No proxy ◀ loaded from the YAML file "config/02/config.yml" ### Example 3 @@ -131,27 +131,19 @@ Variables: ```yml --- -proxy_mode: 1 +proxy_mode: foo ``` #### Output ```shell rougail -m firefox/ -u yaml -yf config/03/config.yml ``` -
🔔 WARNINGS
-┗━━ the value "1" is an invalid string for "proxy_mode", which is not a string, it will be ignored when loading from the YAML file "config/03/config.yml"
-🛑 ERRORS
-┗━━ The following variables are mandatory but have no value:
-    ┗━━ proxy_mode
-
-#### Output when invalid user datas is an error - -```shell -rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_datas_error -``` -
🛑 ERRORS
-┗━━ the value "1" is an invalid string for "proxy_mode", which is not a string, it will be ignored when loading from the YAML file "config/03/config.yml"
+
╭──────── Caption ────────╮
+│ Variable Modified value │
+╰─────────────────────────╯
+Variables:
+┗━━ 📓 Configure Proxy Access to the Internet: foo ◀ loaded from the YAML file "config/03/config.yml"
 
-- [[tutorial v1.1_002] Describe the variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_002/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_002~1..v1.1_002)) +- [[tutorial v1.1_003] Set a default value](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_003/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_003~1..v1.1_003)) diff --git a/config/01/output_ro.html b/config/01/output_ro.html index 45f12184..7ef594fb 100644 --- a/config/01/output_ro.html +++ b/config/01/output_ro.html @@ -1,4 +1,4 @@
🛑 ERRORS
 ┗━━ The following variables are mandatory but have no value:
-    ┗━━ proxy_mode
+    ┗━━ Configure Proxy Access to the Internet
 
diff --git a/config/01/output_rw.html b/config/01/output_rw.html index f6131c09..23659aad 100644 --- a/config/01/output_rw.html +++ b/config/01/output_rw.html @@ -2,5 +2,5 @@ │ Variable Default value │ ╰────────────────────────╯ Variables: -┗━━ 📓 proxy_mode: null +┗━━ 📓 Configure Proxy Access to the Internet: null
diff --git a/config/02/output_ro.html b/config/02/output_ro.html index 06766b93..623e0a62 100644 --- a/config/02/output_ro.html +++ b/config/02/output_ro.html @@ -2,5 +2,5 @@ │ Variable Modified value │ ╰─────────────────────────╯ Variables: -┗━━ 📓 proxy_mode: No proxy ◀ loaded from the YAML file "config/02/config.yml" +┗━━ 📓 Configure Proxy Access to the Internet: No proxy ◀ loaded from the YAML file "config/02/config.yml" diff --git a/config/03/cmd_invalid.txt b/config/03/cmd_invalid.txt deleted file mode 100644 index ffde9149..00000000 --- a/config/03/cmd_invalid.txt +++ /dev/null @@ -1 +0,0 @@ -rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_datas_error \ No newline at end of file diff --git a/config/03/config.yml b/config/03/config.yml index bf6f64ca..e3fa25da 100644 --- a/config/03/config.yml +++ b/config/03/config.yml @@ -1,2 +1,2 @@ --- -proxy_mode: 1 +proxy_mode: foo diff --git a/config/03/output_invalid.html b/config/03/output_invalid.html deleted file mode 100644 index b0816b84..00000000 --- a/config/03/output_invalid.html +++ /dev/null @@ -1,3 +0,0 @@ -
🛑 ERRORS
-┗━━ the value "1" is an invalid string for "proxy_mode", which is not a string, it will be ignored when loading from the YAML file "config/03/config.yml"
-
diff --git a/config/03/output_ro.html b/config/03/output_ro.html index 17cead41..2aeb3ec7 100644 --- a/config/03/output_ro.html +++ b/config/03/output_ro.html @@ -1,6 +1,6 @@ -
🔔 WARNINGS
-┗━━ the value "1" is an invalid string for "proxy_mode", which is not a string, it will be ignored when loading from the YAML file "config/03/config.yml"
-🛑 ERRORS
-┗━━ The following variables are mandatory but have no value:
-    ┗━━ proxy_mode
+
╭──────── Caption ────────╮
+│ Variable Modified value │
+╰─────────────────────────╯
+Variables:
+┗━━ 📓 Configure Proxy Access to the Internet: foo ◀ loaded from the YAML file "config/03/config.yml"
 
diff --git a/tree.html b/tree.html index a747e45f..d3d96ddc 100644 --- a/tree.html +++ b/tree.html @@ -25,9 +25,9 @@

Directory Tree

- .
- └── firefox
-     └── 00-proxy.yml
+ .
+ └── firefox
+     └── 00-proxy.yml


2 directories, 1 file