From b5b5f86098d7b21b3ea286e19bc6bd9a11279b4a Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 12 Mar 2026 08:11:10 +0100 Subject: [PATCH] [tutorial v1.1_170] A leadership family (config and doc) --- README.md | 125 ++++++++++++++++++++++++++++++++------- config/01/output_ro.html | 10 ++-- config/02/cmd_ro.txt | 1 + config/02/config.yml | 5 ++ config/02/output_ro.html | 17 ++++++ tree.html | 30 +++++----- 6 files changed, 149 insertions(+), 39 deletions(-) create mode 100644 config/02/cmd_ro.txt create mode 100644 config/02/config.yml create mode 100644 config/02/output_ro.html diff --git a/README.md b/README.md index 077bbc0d..f1b5d1d4 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_160] Namespace](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_160/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_161~1..v1.1_161)) +- [[tutorial v1.1_161] New "FoxyProxy" namespace](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_161/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_170~1..v1.1_170)) -# [tutorial v1.1_161] New "FoxyProxy" namespace +# [tutorial v1.1_170] A leadership family -[Read the tutorial "New "FoxyProxy" namespace" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#new-foxyproxy-namespace) +[Read the tutorial "A leadership family" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#a-leadership-family) ## 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_161 +git switch --detach v1.1_170 ``` ## Structure @@ -37,21 +37,21 @@ git switch --detach v1.1_161

-.
- ├── 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
- ├── foxyproxy
- │   └── 00-foxyproxy.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
+ ├── foxyproxy
+ │   └── 00-foxyproxy.yml
+ └── types
+     └── proxy
+         └── 00_type.yml


Contents of the foxyproxy/00-foxyproxy.yml file @@ -60,6 +60,16 @@ Contents of the foxyproxy/00-foxyproxy.yml file %YAML 1.2 --- version: 1.1 + +proxies: + description: Proxy configuration + type: leadership + + title: + description: Title or Description + mandatory: false + + color: # Color ... ``` @@ -152,6 +162,41 @@ rougail -m firefox/ -s Firefox -xn FoxyProxy -xd 0 foxyproxy/ --types types/prox | **firefox.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](#firefox.dns_over_https.enable_dns_over_https)" has the value "false" | | **firefox.dns_over_https.custom_dns_url**
[`web address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` *`disabled`* | Custom DNS URL.
**Validators**:
• well-known ports (1 to 1023) are allowed
• registred ports (1024 to 49151) are allowed
• type domainname
• the domain name can be a hostname
• must starts with 'https://' only
**Disabled**: if "[Use Provider](#firefox.dns_over_https.provider)" is not "Custom" | +#### FoxyProxy + +> [!NOTE] +> +> This family is a namespace.\ +> **Path**: foxyproxy\ +> `basic` + +##### Proxy configuration + +> [!NOTE] +> +> This family contains lists of variable blocks.\ +> **Path**: foxyproxy.proxies\ +> `basic` + +| Variable | Description | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------| +| **foxyproxy.proxies.title**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `standard` `unique` | Title or Description. | +| **foxyproxy.proxies.color**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | Color. | + + +*** +### Let's generate the changelog + +```shell +rougail -m firefox/ -s Firefox -xn FoxyProxy -xd 0 foxyproxy/ --types types/proxy --modes_level basic standard advanced -o doc --doc.contents changelog --doc.changelog.previous_json_file previous.yml +``` +#### New variables + +| Variable | Description | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------| +| **foxyproxy.proxies.title**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `standard` `unique` | Title or Description. | +| **foxyproxy.proxies.color**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | Color. | + *** ## User datas @@ -182,8 +227,48 @@ 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): false +- :open_file_folder: foxyproxy (FoxyProxy) + - :open_file_folder: proxies (Proxy configuration): [] + +*** +### Example 2 + +#### config/02/config.yml + + +```yml +--- +foxyproxy: + proxies: + - title: My company + color: '#66cc66' +``` + +*** +#### Output + +```shell +rougail -m firefox/ -s Firefox -xn FoxyProxy -xd 0 foxyproxy/ --types types/proxy --modes_level basic standard advanced -u yaml -yf config/02/config.yml +``` +> [!NOTE] +> +> **Caption:** +> - Variable +> - Default value +> - Modified value + +Variables: +- :open_file_folder: firefox (Firefox) + - :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): false +- :open_file_folder: foxyproxy (FoxyProxy) + - :open_file_folder: proxies (Proxy configuration) + - :open_file_folder: title (Title or Description) + - :notebook: title (Title or Description): My company ← loaded from the YAML file "config/02/config.yml" + - :notebook: color (Color): #66cc66 ← loaded from the YAML file "config/02/config.yml" *** -- [[tutorial v1.1_170] A leadership family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_170/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_170~1..v1.1_170)) +- [[tutorial v1.1_180] Regexp type](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_180~1..v1.1_180)) diff --git a/config/01/output_ro.html b/config/01/output_ro.html index aa0e837f..9ad367b0 100644 --- a/config/01/output_ro.html +++ b/config/01/output_ro.html @@ -2,8 +2,10 @@ │ Variable Default value │ ╰────────────────────────╯ Variables: -┗━━ 📂 firefox (Firefox) - ┣━━ 📓 proxy_mode (Configure Proxy Access to the Internet): No proxy - ┗━━ 📂 dns_over_https (DNS over HTTPS) - ┗━━ 📓 enable_dns_over_https (Enable DNS over HTTPS): false +┣━━ 📂 firefox (Firefox) +┣━━ 📓 proxy_mode (Configure Proxy Access to the Internet): No proxy +┗━━ 📂 dns_over_https (DNS over HTTPS) + ┗━━ 📓 enable_dns_over_https (Enable DNS over HTTPS): false +┗━━ 📂 foxyproxy (FoxyProxy) + ┗━━ 📂 proxies (Proxy configuration): [] diff --git a/config/02/cmd_ro.txt b/config/02/cmd_ro.txt new file mode 100644 index 00000000..0841fc15 --- /dev/null +++ b/config/02/cmd_ro.txt @@ -0,0 +1 @@ +rougail -m firefox/ -s Firefox -xn FoxyProxy -xd 0 foxyproxy/ --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..22d9b3b8 --- /dev/null +++ b/config/02/config.yml @@ -0,0 +1,5 @@ +--- +foxyproxy: + proxies: + - title: My company + color: '#66cc66' diff --git a/config/02/output_ro.html b/config/02/output_ro.html new file mode 100644 index 00000000..dd9ff84a --- /dev/null +++ b/config/02/output_ro.html @@ -0,0 +1,17 @@ +
╭──────── Caption ────────╮
+│ Variable Default value  │
+│          Modified value │
+╰─────────────────────────╯
+Variables:
+┣━━ 📂 firefox (Firefox)
+┣━━ 📓 proxy_mode (Configure Proxy Access to the Internet): No proxy
+┗━━ 📂 dns_over_https (DNS over HTTPS)
+    ┗━━ 📓 enable_dns_over_https (Enable DNS over HTTPS): false
+┗━━ 📂 foxyproxy (FoxyProxy)
+    ┗━━ 📂 proxies (Proxy configuration)
+        ┗━━ 📂 title (Title or Description)
+            ┣━━ 📓 title (Title or Description): My company ◀ loaded from the 
+            YAML file "config/02/config.yml"
+            ┗━━ 📓 color (Color): #66cc66 ◀ loaded from the YAML file 
+                "config/02/config.yml"
+
diff --git a/tree.html b/tree.html index 3e22ed8a..e4c3794c 100644 --- a/tree.html +++ b/tree.html @@ -1,17 +1,17 @@

-.
- ├── 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
- ├── foxyproxy
- │   └── 00-foxyproxy.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
+ ├── foxyproxy
+ │   └── 00-foxyproxy.yml
+ └── types
+     └── proxy
+         └── 00_type.yml


\ No newline at end of file