From e242a29d1d6635e85ed19554df5b34dc7bbace95 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 12 Mar 2026 08:10:18 +0100 Subject: [PATCH] [tutorial v1.1_003] Set a default value (config and doc) --- README.md | 48 +++++++++++++++++----------------------- config/01/cmd_rw.txt | 1 - config/01/output_ro.html | 8 ++++--- config/01/output_rw.html | 6 ----- config/02/output_ro.html | 9 ++++---- config/03/output_ro.html | 9 ++++---- tree.html | 6 ++--- 7 files changed, 38 insertions(+), 49 deletions(-) delete mode 100644 config/01/cmd_rw.txt delete mode 100644 config/01/output_rw.html diff --git a/README.md b/README.md index 073d5e48..d8f3a665 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_001] Let’s add our first variable](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_002~1..v1.1_002)) +- [[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_003~1..v1.1_003)) -# [tutorial v1.1_002] Describe the variable +# [tutorial v1.1_003] Set a default value -[Read the tutorial "Describe the variable" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/preliminary.html#describe-the-variable) +[Read the tutorial "Set a default value" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/preliminary.html#set-a-default-value) ## 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_002 +git switch --detach v1.1_003 ``` ## Structure @@ -37,9 +37,9 @@ git switch --detach v1.1_002

-.
- └── 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: # Configure Proxy Access to the Internet +proxy_mode: No proxy # Configure Proxy Access to the Internet ... ``` @@ -60,9 +60,9 @@ proxy_mode: # Configure Proxy Access to the Internet ```shell rougail -m firefox/ -o doc ``` -| Variable | Description | -|------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------| -| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet. | +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.
**Default**: No proxy | *** @@ -73,9 +73,9 @@ rougail -m firefox/ -o doc --doc.contents changelog --doc.changelog.previous_jso ``` #### Modified variable -| Variable | Description | -|------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------| -| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet. | +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------| +| **proxy_mode**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.
**Default**: No proxy | *** @@ -96,16 +96,6 @@ rougail -m firefox/ -o doc --doc.contents changelog --doc.changelog.previous_jso ```shell rougail -m firefox/ -u yaml -yf config/01/config.yml ``` -> [!CAUTION] -> -> - proxy_mode (Configure Proxy Access to the Internet): :stop_sign: mandatory variable but has no value - -*** -#### Output in read write mode - -```shell -rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.read_write -``` > [!NOTE] > > **Caption:** @@ -113,7 +103,7 @@ rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.read_write > - Default value Variables: -- :notebook: proxy_mode (Configure Proxy Access to the Internet): null +- :notebook: proxy_mode (Configure Proxy Access to the Internet): No proxy *** ### Example 2 @@ -137,9 +127,10 @@ rougail -m firefox/ -u yaml -yf config/02/config.yml > **Caption:** > - Variable > - Modified value +> - (:hourglass_flowing_sand: Original default value) Variables: -- :notebook: proxy_mode (Configure Proxy Access to the Internet): No proxy ← loaded from the YAML file "config/02/config.yml" +- :notebook: proxy_mode (Configure Proxy Access to the Internet): No proxy ← loaded from the YAML file "config/02/config.yml" (:hourglass_flowing_sand: No proxy) *** ### Example 3 @@ -163,11 +154,12 @@ rougail -m firefox/ -u yaml -yf config/03/config.yml > **Caption:** > - Variable > - Modified value +> - (:hourglass_flowing_sand: Original default value) Variables: -- :notebook: proxy_mode (Configure Proxy Access to the Internet): foo ← loaded from the YAML file "config/03/config.yml" +- :notebook: proxy_mode (Configure Proxy Access to the Internet): foo ← loaded from the YAML file "config/03/config.yml" (:hourglass_flowing_sand: No proxy) *** -- [[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)) +- [[tutorial v1.1_010] A variable with a list of possible values](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)) diff --git a/config/01/cmd_rw.txt b/config/01/cmd_rw.txt deleted file mode 100644 index 93f7d8e7..00000000 --- a/config/01/cmd_rw.txt +++ /dev/null @@ -1 +0,0 @@ -rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.read_write \ No newline at end of file diff --git a/config/01/output_ro.html b/config/01/output_ro.html index 208adf8c..bb585a60 100644 --- a/config/01/output_ro.html +++ b/config/01/output_ro.html @@ -1,4 +1,6 @@ -
🛑 Caution
-┗━━ proxy_mode (Configure Proxy Access to the Internet): 🛑 mandatory variable 
-    but has no value
+
╭─────── Caption ────────╮
+│ Variable Default value │
+╰────────────────────────╯
+Variables:
+┗━━ 📓 proxy_mode (Configure Proxy Access to the Internet): No proxy
 
diff --git a/config/01/output_rw.html b/config/01/output_rw.html deleted file mode 100644 index 2495b81f..00000000 --- a/config/01/output_rw.html +++ /dev/null @@ -1,6 +0,0 @@ -
╭─────── Caption ────────╮
-│ Variable Default value │
-╰────────────────────────╯
-Variables:
-┗━━ 📓 proxy_mode (Configure Proxy Access to the Internet): null
-
diff --git a/config/02/output_ro.html b/config/02/output_ro.html index 74819b24..c8ed2315 100644 --- a/config/02/output_ro.html +++ b/config/02/output_ro.html @@ -1,7 +1,8 @@ -
╭──────── Caption ────────╮
-│ Variable Modified value │
-╰─────────────────────────╯
+
╭────────────── Caption ───────────────╮
+│ Variable Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
 Variables:
 ┗━━ 📓 proxy_mode (Configure Proxy Access to the Internet): No proxy ◀ loaded 
-    from the YAML file "config/02/config.yml"
+    from the YAML file "config/02/config.yml" (⏳ No proxy)
 
diff --git a/config/03/output_ro.html b/config/03/output_ro.html index 51687266..5d88bf40 100644 --- a/config/03/output_ro.html +++ b/config/03/output_ro.html @@ -1,7 +1,8 @@ -
╭──────── Caption ────────╮
-│ Variable Modified value │
-╰─────────────────────────╯
+
╭────────────── Caption ───────────────╮
+│ Variable Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
 Variables:
 ┗━━ 📓 proxy_mode (Configure Proxy Access to the Internet): foo ◀ loaded from 
-    the YAML file "config/03/config.yml"
+    the YAML file "config/03/config.yml" (⏳ No proxy)
 
diff --git a/tree.html b/tree.html index 631fdc67..0fcfeacd 100644 --- a/tree.html +++ b/tree.html @@ -1,5 +1,5 @@

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


\ No newline at end of file