diff --git a/README.md b/README.md index a715e5ac..2c6ab925 100644 --- a/README.md +++ b/README.md @@ -1,8 +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_000)] An empty structured file with format version +# [tutorial v1.1_001)] A first variable with only a name -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_000~1..v1.1_000) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_001~1..v1.1_001) ## Screenshot @@ -28,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_000 +git switch --detach v1.1_001 ``` ## Structure @@ -36,9 +37,9 @@ git switch --detach v1.1_000
-.
- └── firefox
- └── 00-proxy.yml
+.
+ └── firefox
+ └── 00-proxy.yml
🛑 ERRORS +┗━━ The following variables are mandatory but have no value: + ┗━━ proxy_mode ++#### Output in read write mode + +```shell +rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.read_write +``` +
╭─────── Caption ────────╮ +│ Variable Default value │ +╰────────────────────────╯ +Variables: +┗━━ 📓 proxy_mode: null ++### Example 2 + +#### config/02/config.yml -- [[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)) +```yml +--- +proxy_mode: No proxy +``` +#### Output + +```shell +rougail -m firefox/ -u yaml -yf config/02/config.yml +``` +
╭──────── Caption ────────╮
+│ Variable Modified value │
+╰─────────────────────────╯
+Variables:
+┗━━ 📓 proxy_mode: No proxy ◀ loaded from the YAML file "config/02/config.yml"
+
+### Example 3
+
+#### config/03/config.yml
+
+
+```yml
+---
+proxy_mode: 1
+```
+#### 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" ++ + +- [[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)) diff --git a/config/01/cmd_rw.txt b/config/01/cmd_rw.txt new file mode 100644 index 00000000..93f7d8e7 --- /dev/null +++ b/config/01/cmd_rw.txt @@ -0,0 +1 @@ +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 24ce0202..45f12184 100644 --- a/config/01/output_ro.html +++ b/config/01/output_ro.html @@ -1 +1,4 @@ - +
🛑 ERRORS +┗━━ The following variables are mandatory but have no value: + ┗━━ proxy_mode +diff --git a/config/01/output_rw.html b/config/01/output_rw.html new file mode 100644 index 00000000..f6131c09 --- /dev/null +++ b/config/01/output_rw.html @@ -0,0 +1,6 @@ +
╭─────── Caption ────────╮ +│ Variable Default value │ +╰────────────────────────╯ +Variables: +┗━━ 📓 proxy_mode: null +diff --git a/config/02/cmd_ro.txt b/config/02/cmd_ro.txt new file mode 100644 index 00000000..772ebbef --- /dev/null +++ b/config/02/cmd_ro.txt @@ -0,0 +1 @@ +rougail -m firefox/ -u yaml -yf config/02/config.yml \ No newline at end of file diff --git a/config/02/config.yml b/config/02/config.yml new file mode 100644 index 00000000..d9144882 --- /dev/null +++ b/config/02/config.yml @@ -0,0 +1,2 @@ +--- +proxy_mode: No proxy diff --git a/config/02/output_ro.html b/config/02/output_ro.html new file mode 100644 index 00000000..06766b93 --- /dev/null +++ b/config/02/output_ro.html @@ -0,0 +1,6 @@ +
╭──────── Caption ────────╮
+│ Variable Modified value │
+╰─────────────────────────╯
+Variables:
+┗━━ 📓 proxy_mode: 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
new file mode 100644
index 00000000..ffde9149
--- /dev/null
+++ b/config/03/cmd_invalid.txt
@@ -0,0 +1 @@
+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/cmd_ro.txt b/config/03/cmd_ro.txt
new file mode 100644
index 00000000..fc8085eb
--- /dev/null
+++ b/config/03/cmd_ro.txt
@@ -0,0 +1 @@
+rougail -m firefox/ -u yaml -yf config/03/config.yml
\ No newline at end of file
diff --git a/config/03/config.yml b/config/03/config.yml
new file mode 100644
index 00000000..bf6f64ca
--- /dev/null
+++ b/config/03/config.yml
@@ -0,0 +1,2 @@
+---
+proxy_mode: 1
diff --git a/config/03/output_invalid.html b/config/03/output_invalid.html
new file mode 100644
index 00000000..b0816b84
--- /dev/null
+++ b/config/03/output_invalid.html
@@ -0,0 +1,3 @@
+🛑 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 new file mode 100644 index 00000000..17cead41 --- /dev/null +++ b/config/03/output_ro.html @@ -0,0 +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 +diff --git a/firefox.png b/firefox.png index 050f837f..45725ac6 100644 Binary files a/firefox.png and b/firefox.png differ diff --git a/tree.html b/tree.html index 5ca2bf3e..a747e45f 100644 --- a/tree.html +++ b/tree.html @@ -25,9 +25,9 @@
- .
- └── firefox
- └── 00-proxy.yml
+ .
+ └── firefox
+ └── 00-proxy.yml
2 directories, 1 file