From 220040bd4169fb3ac55741ebda2be328d05f76c7 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Tue, 4 Nov 2025 19:22:05 +0100 Subject: [PATCH] [tutorial v1.1_012)] Set a default value (config and doc) --- README.md | 71 ++++++++++++++++++++++------------------ config/01/output_ro.html | 8 +++-- config/02/output_ro.html | 9 ++--- config/03/output_ro.html | 9 ++--- config/04/output_ro.html | 9 ++--- config/05/output_ro.html | 8 +++-- 6 files changed, 64 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index d1daea88..f8ac1eec 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_010] A first variable with only a name](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_010/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_010~1..v1.1_010)) +- [[tutorial v1.1_011] Describe the variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_011/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_011~1..v1.1_011)) -# [tutorial v1.1_011)] Describe the variable +# [tutorial v1.1_012)] Set a default value -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_011~1..v1.1_011) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_012~1..v1.1_012) ## Screenshot @@ -23,31 +23,31 @@ --- version: 1.1 -proxy_mode: # Configure Proxy Access to the Internet +proxy_mode: No proxy # Configure Proxy Access to the Internet ... ``` ### Let's generate the documentation ```console -foo@bar:~$ git switch --detach v1.1_011 +foo@bar:~$ git switch --detach v1.1_012 foo@bar:~$ rougail -m firefox/ -o doc -do github ``` | Variable                                                                                        | Description                                                                                     | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet. | +| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.
**Default**: No proxy | ### Let's generate the changelog ```console -foo@bar:~$ git switch --detach v1.1_011 +foo@bar:~$ git switch --detach v1.1_012 foo@bar:~$ rougail -m firefox/ -o doc --doc.contents changelog -do github ``` #### Modified variable | Variable                                                                                        | Description                                                                                     | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet. | +| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.
**Default**: No proxy | ## User datas @@ -64,12 +64,14 @@ foo@bar:~$ rougail -m firefox/ -o doc --doc.contents changelog -do github #### Output ```console -foo@bar:~$ git switch --detach v1.1_011 +foo@bar:~$ git switch --detach v1.1_012 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/01/config.yaml ``` -
🛑 ERRORS
-┗━━ The following variables are mandatory but have no value:
-    ┗━━ Configure Proxy Access to the Internet
+
╭─────── Caption ────────╮
+│ Variable Default value │
+╰────────────────────────╯
+Variables:
+┗━━ 📓 Configure Proxy Access to the Internet: No proxy
 
### Example 2 @@ -84,14 +86,15 @@ proxy_mode: No proxy #### Output ```console -foo@bar:~$ git switch --detach v1.1_011 +foo@bar:~$ git switch --detach v1.1_012 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/02/config.yaml ``` -
╭──────── Caption ────────╮
-│ Variable Modified value │
-╰─────────────────────────╯
+
╭────────────── Caption ───────────────╮
+│ Variable Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
 Variables:
-┗━━ 📓 Configure Proxy Access to the Internet: No proxy ◀ loaded from the YAML file "config/02/config.yaml"
+┗━━ 📓 Configure Proxy Access to the Internet: No proxy ◀ loaded from the YAML file "config/02/config.yaml" (⏳ No proxy)
 
### Example 3 @@ -106,14 +109,15 @@ proxy_mode: Manual proxy configuration #### Output ```console -foo@bar:~$ git switch --detach v1.1_011 +foo@bar:~$ git switch --detach v1.1_012 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/03/config.yaml ``` -
╭──────── Caption ────────╮
-│ Variable Modified value │
-╰─────────────────────────╯
+
╭────────────── Caption ───────────────╮
+│ Variable Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
 Variables:
-┗━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/03/config.yaml"
+┗━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/03/config.yaml" (⏳ No proxy)
 
### Example 4 @@ -128,14 +132,15 @@ proxy_mode: foo #### Output ```console -foo@bar:~$ git switch --detach v1.1_011 +foo@bar:~$ git switch --detach v1.1_012 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/04/config.yaml ``` -
╭──────── Caption ────────╮
-│ Variable Modified value │
-╰─────────────────────────╯
+
╭────────────── Caption ───────────────╮
+│ Variable Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
 Variables:
-┗━━ 📓 Configure Proxy Access to the Internet: foo ◀ loaded from the YAML file "config/04/config.yaml"
+┗━━ 📓 Configure Proxy Access to the Internet: foo ◀ loaded from the YAML file "config/04/config.yaml" (⏳ No proxy)
 
### Example 5 @@ -150,15 +155,17 @@ proxy_mode: 1 #### Output ```console -foo@bar:~$ git switch --detach v1.1_011 +foo@bar:~$ git switch --detach v1.1_012 foo@bar:~$ rougail -m firefox/ -u yaml -ff config/05/config.yaml ```
🔔 WARNINGS
 ┗━━ the value "1" is an invalid string for "proxy_mode" (Configure Proxy Access to the Internet), which is not a string, it will be ignored when loading from the YAML file "config/05/config.yaml"
-🛑 ERRORS
-┗━━ The following variables are mandatory but have no value:
-    ┗━━ Configure Proxy Access to the Internet
+╭─────── Caption ────────╮
+│ Variable Default value │
+╰────────────────────────╯
+Variables:
+┗━━ 📓 Configure Proxy Access to the Internet: No proxy
 
-- [[tutorial v1.1_012] Set a default value](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_012/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_012~1..v1.1_012)) +- [[tutorial v1.1_013] The variable is a "choice" variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_013/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_013~1..v1.1_013)) diff --git a/config/01/output_ro.html b/config/01/output_ro.html index 7ef594fb..ea9c2266 100644 --- a/config/01/output_ro.html +++ b/config/01/output_ro.html @@ -1,4 +1,6 @@ -
🛑 ERRORS
-┗━━ The following variables are mandatory but have no value:
-    ┗━━ Configure Proxy Access to the Internet
+
╭─────── Caption ────────╮
+│ Variable Default value │
+╰────────────────────────╯
+Variables:
+┗━━ 📓 Configure Proxy Access to the Internet: No proxy
 
diff --git a/config/02/output_ro.html b/config/02/output_ro.html index 873a28a0..b0153620 100644 --- a/config/02/output_ro.html +++ b/config/02/output_ro.html @@ -1,6 +1,7 @@ -
╭──────── Caption ────────╮
-│ Variable Modified value │
-╰─────────────────────────╯
+
╭────────────── Caption ───────────────╮
+│ Variable Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
 Variables:
-┗━━ 📓 Configure Proxy Access to the Internet: No proxy ◀ loaded from the YAML file "config/02/config.yaml"
+┗━━ 📓 Configure Proxy Access to the Internet: No proxy ◀ loaded from the YAML file "config/02/config.yaml" (⏳ No proxy)
 
diff --git a/config/03/output_ro.html b/config/03/output_ro.html index d1b32109..6ffb1f47 100644 --- a/config/03/output_ro.html +++ b/config/03/output_ro.html @@ -1,6 +1,7 @@ -
╭──────── Caption ────────╮
-│ Variable Modified value │
-╰─────────────────────────╯
+
╭────────────── Caption ───────────────╮
+│ Variable Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
 Variables:
-┗━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/03/config.yaml"
+┗━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/03/config.yaml" (⏳ No proxy)
 
diff --git a/config/04/output_ro.html b/config/04/output_ro.html index 25cead20..257dbe7e 100644 --- a/config/04/output_ro.html +++ b/config/04/output_ro.html @@ -1,6 +1,7 @@ -
╭──────── Caption ────────╮
-│ Variable Modified value │
-╰─────────────────────────╯
+
╭────────────── Caption ───────────────╮
+│ Variable Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
 Variables:
-┗━━ 📓 Configure Proxy Access to the Internet: foo ◀ loaded from the YAML file "config/04/config.yaml"
+┗━━ 📓 Configure Proxy Access to the Internet: foo ◀ loaded from the YAML file "config/04/config.yaml" (⏳ No proxy)
 
diff --git a/config/05/output_ro.html b/config/05/output_ro.html index 0f885343..8ab79d7c 100644 --- a/config/05/output_ro.html +++ b/config/05/output_ro.html @@ -1,6 +1,8 @@
🔔 WARNINGS
 ┗━━ the value "1" is an invalid string for "proxy_mode" (Configure Proxy Access to the Internet), which is not a string, it will be ignored when loading from the YAML file "config/05/config.yaml"
-🛑 ERRORS
-┗━━ The following variables are mandatory but have no value:
-    ┗━━ Configure Proxy Access to the Internet
+╭─────── Caption ────────╮
+│ Variable Default value │
+╰────────────────────────╯
+Variables:
+┗━━ 📓 Configure Proxy Access to the Internet: No proxy