diff --git a/README.md b/README.md index d650c501..db8ef603 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_130] A variable in avanced mode](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_130/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_140~1..v1.1_140)) +- [[tutorial v1.1_140] A boolean variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_140/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_141~1..v1.1_141)) -# [tutorial v1.1_140] A boolean variable +# [tutorial v1.1_141] A choice variable -[Read the tutorial "A boolean variable" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#a-boolean-variable) +[Read the tutorial "A choice variable" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#a-choice-variable) ## 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_140 +git switch --detach v1.1_141 ``` ## Structure @@ -37,19 +37,19 @@ git switch --detach v1.1_140

-.
- ├── firefox
- │   ├── 00-proxy.yml
- │   ├── 10-manual.yml
- │   ├── 20-manual.yml
- │   ├── 30-auto.yml
- │   ├── 40-no_proxy.yml
- │   ├── 50-prompt_authentication.yml
- │   ├── 55-proxy_dns_socks5.yml
- │   └── 60-dns_over_https.yml
- └── types
-     └── proxy
-         └── 00_type.yml
+.
+ ├── firefox
+ │   ├── 00-proxy.yml
+ │   ├── 10-manual.yml
+ │   ├── 20-manual.yml
+ │   ├── 30-auto.yml
+ │   ├── 40-no_proxy.yml
+ │   ├── 50-prompt_authentication.yml
+ │   ├── 55-proxy_dns_socks5.yml
+ │   └── 60-dns_over_https.yml
+ └── types
+     └── proxy
+         └── 00_type.yml


Contents of the firefox/60-dns_over_https.yml file @@ -62,6 +62,17 @@ version: 1.1 dns_over_https: # DNS over HTTPS enable_dns_over_https: false # Enable DNS over HTTPS + + provider: + description: Use Provider + choices: + - Cloudflare + - NextDNS + - Custom + default: Cloudflare + disabled: + variable: _.enable_dns_over_https + when: false ... ``` @@ -140,9 +151,10 @@ rougail -m firefox/ --types types/proxy --modes_level basic standard advanced -o > **Path**: dns_over_https\ > `standard` -| Variable | Description | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------| -| **dns_over_https.enable_dns_over_https**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Enable DNS over HTTPS.
**Default**: false | +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **dns_over_https.enable_dns_over_https**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Enable DNS over HTTPS.
**Default**: false | +| **dns_over_https.provider**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` *`disabled`* | Use Provider.
**Choices**:
• Cloudflare **← (default)**
• NextDNS
• Custom
**Disabled**: when the variable "[Enable DNS over HTTPS](#dns_over_https.enable_dns_over_https)" has the value "false" | *** @@ -153,9 +165,9 @@ rougail -m firefox/ --types types/proxy --modes_level basic standard advanced -o ``` #### New variable -| Variable | Description | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------| -| **dns_over_https.enable_dns_over_https**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Enable DNS over HTTPS.
**Default**: false | +| Variable | Description | +|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **dns_over_https.provider**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` *`disabled`* | Use Provider.
**Choices**:
• Cloudflare **← (default)**
• NextDNS
• Custom
**Disabled**: when the variable "[Enable DNS over HTTPS](#dns_over_https.enable_dns_over_https)" has the value "false" | *** @@ -188,6 +200,38 @@ Variables: - :notebook: enable_dns_over_https (Enable DNS over HTTPS): false *** +### Example 2 + +#### config/02/config.yml -- [[tutorial v1.1_141] A choice variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_141/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_141~1..v1.1_141)) +```yml +--- +dns_over_https: + enable_dns_over_https: true +``` + +*** +#### Output + +```shell +rougail -m firefox/ --types types/proxy --modes_level basic standard advanced -u yaml -yf config/02/config.yml +``` +> [!NOTE] +> +> **Caption:** +> - Variable +> - Default value +> - Modified value +> - (:hourglass_flowing_sand: Original default value) + +Variables: +- :notebook: proxy_mode (Configure Proxy Access to the Internet): No proxy +- :open_file_folder: dns_over_https (DNS over HTTPS) + - :notebook: enable_dns_over_https (Enable DNS over HTTPS): true ← loaded from the YAML file "config/02/config.yml" (:hourglass_flowing_sand: false) + - :notebook: provider (Use Provider): Cloudflare + +*** + + +- [[tutorial v1.1_142] A web_address variable ](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_142/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_142~1..v1.1_142)) diff --git a/config/02/cmd_ro.txt b/config/02/cmd_ro.txt new file mode 100644 index 00000000..44796ffd --- /dev/null +++ b/config/02/cmd_ro.txt @@ -0,0 +1 @@ +rougail -m firefox/ --types types/proxy --modes_level basic standard advanced -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..aee4796f --- /dev/null +++ b/config/02/config.yml @@ -0,0 +1,3 @@ +--- +dns_over_https: + enable_dns_over_https: true diff --git a/config/02/output_ro.html b/config/02/output_ro.html new file mode 100644 index 00000000..de930b83 --- /dev/null +++ b/config/02/output_ro.html @@ -0,0 +1,12 @@ +
╭────────────── Caption ───────────────╮
+│ Variable Default value               │
+│          Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode (Configure Proxy Access to the Internet): No proxy
+┗━━ 📂 dns_over_https (DNS over HTTPS)
+    ┣━━ 📓 enable_dns_over_https (Enable DNS over HTTPS): true ◀ loaded from the
+    YAML file "config/02/config.yml" (⏳ false)
+    ┗━━ 📓 provider (Use Provider): Cloudflare
+
diff --git a/tree.html b/tree.html index ad935bfb..b002297a 100644 --- a/tree.html +++ b/tree.html @@ -1,15 +1,15 @@

-.
- ├── firefox
- │   ├── 00-proxy.yml
- │   ├── 10-manual.yml
- │   ├── 20-manual.yml
- │   ├── 30-auto.yml
- │   ├── 40-no_proxy.yml
- │   ├── 50-prompt_authentication.yml
- │   ├── 55-proxy_dns_socks5.yml
- │   └── 60-dns_over_https.yml
- └── types
-     └── proxy
-         └── 00_type.yml
+.
+ ├── firefox
+ │   ├── 00-proxy.yml
+ │   ├── 10-manual.yml
+ │   ├── 20-manual.yml
+ │   ├── 30-auto.yml
+ │   ├── 40-no_proxy.yml
+ │   ├── 50-prompt_authentication.yml
+ │   ├── 55-proxy_dns_socks5.yml
+ │   └── 60-dns_over_https.yml
+ └── types
+     └── proxy
+         └── 00_type.yml


\ No newline at end of file