[tutorial v1.1_102] A web_address variable (config and doc)
This commit is contained in:
parent
c36e564440
commit
3530c36638
8 changed files with 157 additions and 34 deletions
121
README.md
121
README.md
|
|
@ -1,11 +1,11 @@
|
|||
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
|
||||
- [[tutorial v1.1_100] A boolean variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_100/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_100~1..v1.1_100))
|
||||
- [[tutorial v1.1_101] A choice variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_101~1..v1.1_101))
|
||||
|
||||
# [tutorial v1.1_101] A choice variable
|
||||
# [tutorial v1.1_102] A web_address variable
|
||||
|
||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_101~1..v1.1_101)
|
||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_102~1..v1.1_102)
|
||||
|
||||
[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/calculation.html#a-choice-variable)
|
||||
[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/calculation.html#a-web_address-variable)
|
||||
|
||||
|
||||
## Screenshot
|
||||
|
|
@ -31,7 +31,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_101
|
||||
git switch --detach v1.1_102
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
|
@ -39,16 +39,16 @@ git switch --detach v1.1_101
|
|||
|
||||
|
||||
<p>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./">.</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/">firefox</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/30-auto.yml">30-auto.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/60-dns_over_https.yml">60-dns_over_https.yml</a><br/>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./">.</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/">firefox</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/30-auto.yml">30-auto.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/60-dns_over_https.yml">60-dns_over_https.yml</a><br/>
|
||||
<br/><br/></p>
|
||||
|
||||
Contents of the firefox/60-dns_over_https.yml file
|
||||
|
|
@ -72,6 +72,16 @@ dns_over_https: # DNS over HTTPS
|
|||
disabled:
|
||||
variable: _.enable_dns_over_https
|
||||
when: false
|
||||
|
||||
custom_dns_url:
|
||||
description: Custom DNS URL
|
||||
type: web_address
|
||||
disabled:
|
||||
jinja: |-
|
||||
{% if _.provider is propertyerror or _.provider != 'Custom' %}
|
||||
provider is not custom
|
||||
{% endif %}
|
||||
description: if "_.provider" is not "Custom"
|
||||
...
|
||||
|
||||
```
|
||||
|
|
@ -142,12 +152,13 @@ rougail -m firefox/ --modes_level basic standard advanced -o doc
|
|||
> [!NOTE]
|
||||
>
|
||||
> **Path**: dns_over_https\
|
||||
> `standard`
|
||||
> `basic`
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **<a id="dns_over_https.enable_dns_over_https" name="dns_over_https.enable_dns_over_https">dns_over_https.enable_dns_over_https</a>**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Enable DNS over HTTPS.<br/>**Default**: false |
|
||||
| **<a id="dns_over_https.provider" name="dns_over_https.provider">dns_over_https.provider</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` *`disabled`* | Use Provider.<br/>**Choices**: <br/>• Cloudflare **← (default)**<br/>• NextDNS<br/>• Custom<br/>**Disabled**: when the variable "[Enable DNS over HTTPS](#dns_over_https.enable_dns_over_https)" has the value "false" |
|
||||
| **<a id="dns_over_https.custom_dns_url" name="dns_over_https.custom_dns_url">dns_over_https.custom_dns_url</a>**<br/>[`web address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` *`disabled`* | Custom DNS URL.<br/>**Validators**: <br/>• well-known ports (1 to 1023) are allowed<br/>• registred ports (1024 to 49151) are allowed<br/>• type domainname<br/>• the domain name can be a hostname<br/>**Disabled**: if "[Use Provider](#dns_over_https.provider)" is not "Custom" |
|
||||
|
||||
|
||||
***
|
||||
|
|
@ -159,8 +170,8 @@ rougail -m firefox/ --modes_level basic standard advanced -o doc --doc.contents
|
|||
#### New variable
|
||||
|
||||
| Variable | Description |
|
||||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **<a id="dns_over_https.provider" name="dns_over_https.provider">dns_over_https.provider</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` *`disabled`* | Use Provider.<br/>**Choices**: <br/>• Cloudflare **← (default)**<br/>• NextDNS<br/>• Custom<br/>**Disabled**: when the variable "[Enable DNS over HTTPS](#dns_over_https.enable_dns_over_https)" has the value "false" |
|
||||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **<a id="dns_over_https.custom_dns_url" name="dns_over_https.custom_dns_url">dns_over_https.custom_dns_url</a>**<br/>[`web address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` *`disabled`* | Custom DNS URL.<br/>**Validators**: <br/>• well-known ports (1 to 1023) are allowed<br/>• registred ports (1024 to 49151) are allowed<br/>• type domainname<br/>• the domain name can be a hostname<br/>**Disabled**: if "[Use Provider](#dns_over_https.provider)" is not "Custom" |
|
||||
|
||||
|
||||
***
|
||||
|
|
@ -225,6 +236,76 @@ Variables:
|
|||
- :notebook: provider (Use Provider): <span style="color: #B8860B">Cloudflare</span>
|
||||
|
||||
***
|
||||
### Example 3
|
||||
|
||||
#### config/03/config.yml
|
||||
|
||||
|
||||
- [[tutorial v1.1_102] A web_address variable ](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_102~1..v1.1_102))
|
||||
```yml
|
||||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: http://dns.net
|
||||
```
|
||||
|
||||
***
|
||||
#### Output
|
||||
|
||||
```shell
|
||||
rougail -m firefox/ --modes_level basic standard advanced -u yaml -yf config/03/config.yml
|
||||
```
|
||||
> [!NOTE]
|
||||
>
|
||||
> **Caption:**
|
||||
> - Variable
|
||||
> - <span style="color: #B8860B">Default value</span>
|
||||
> - <span style="color: #006400">Modified value</span>
|
||||
> - (:hourglass_flowing_sand: Original default value)
|
||||
|
||||
Variables:
|
||||
- :notebook: proxy_mode (Configure Proxy Access to the Internet): <span style="color: #B8860B">No proxy</span>
|
||||
- :open_file_folder: dns_over_https (DNS over HTTPS)
|
||||
- :notebook: enable_dns_over_https (Enable DNS over HTTPS): <span style="color: #006400">true</span> ← loaded from the YAML file "config/03/config.yml" (:hourglass_flowing_sand: false)
|
||||
- :notebook: provider (Use Provider): <span style="color: #006400">Custom</span> ← loaded from the YAML file "config/03/config.yml" (:hourglass_flowing_sand: Cloudflare)
|
||||
- :notebook: custom_dns_url (Custom DNS URL): <span style="color: #006400">http://dns.net</span> ← loaded from the YAML file "config/03/config.yml"
|
||||
|
||||
***
|
||||
### Example 4
|
||||
|
||||
#### config/04/config.yml
|
||||
|
||||
|
||||
```yml
|
||||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: https://dns.net
|
||||
```
|
||||
|
||||
***
|
||||
#### Output
|
||||
|
||||
```shell
|
||||
rougail -m firefox/ --modes_level basic standard advanced -u yaml -yf config/04/config.yml
|
||||
```
|
||||
> [!NOTE]
|
||||
>
|
||||
> **Caption:**
|
||||
> - Variable
|
||||
> - <span style="color: #B8860B">Default value</span>
|
||||
> - <span style="color: #006400">Modified value</span>
|
||||
> - (:hourglass_flowing_sand: Original default value)
|
||||
|
||||
Variables:
|
||||
- :notebook: proxy_mode (Configure Proxy Access to the Internet): <span style="color: #B8860B">No proxy</span>
|
||||
- :open_file_folder: dns_over_https (DNS over HTTPS)
|
||||
- :notebook: enable_dns_over_https (Enable DNS over HTTPS): <span style="color: #006400">true</span> ← loaded from the YAML file "config/04/config.yml" (:hourglass_flowing_sand: false)
|
||||
- :notebook: provider (Use Provider): <span style="color: #006400">Custom</span> ← loaded from the YAML file "config/04/config.yml" (:hourglass_flowing_sand: Cloudflare)
|
||||
- :notebook: custom_dns_url (Custom DNS URL): <span style="color: #006400">https://dns.net</span> ← loaded from the YAML file "config/04/config.yml"
|
||||
|
||||
***
|
||||
|
||||
|
||||
- [[tutorial v1.1_103] A variable with custom validation](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_103/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_103~1..v1.1_103))
|
||||
|
|
|
|||
1
config/03/cmd_ro.txt
Normal file
1
config/03/cmd_ro.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
rougail -m firefox/ --modes_level basic standard advanced -u yaml -yf config/03/config.yml
|
||||
5
config/03/config.yml
Normal file
5
config/03/config.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: http://dns.net
|
||||
15
config/03/output_ro.html
Normal file
15
config/03/output_ro.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<pre>╭────────────── Caption ───────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ <span style="color: #00aa00">Modified value</span> │
|
||||
│ (⏳ Original default value) │
|
||||
╰──────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┣━━ </span>📓 proxy_mode (Configure Proxy Access to the Internet): <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┗━━ </span>📂 dns_over_https (DNS over HTTPS)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 enable_dns_over_https (Enable DNS over HTTPS): <span style="color: #00aa00">true</span> ◀ loaded from the
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┃ </span>YAML file "config/03/config.yml" (⏳ false)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 provider (Use Provider): <span style="color: #00aa00">Custom</span> ◀ loaded from the YAML file
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┃ </span>"config/03/config.yml" (⏳ Cloudflare)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 custom_dns_url (Custom DNS URL): <span style="color: #00aa00">http://dns.net</span> ◀ loaded from the
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span>YAML file "config/03/config.yml"
|
||||
</pre>
|
||||
1
config/04/cmd_ro.txt
Normal file
1
config/04/cmd_ro.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
rougail -m firefox/ --modes_level basic standard advanced -u yaml -yf config/04/config.yml
|
||||
5
config/04/config.yml
Normal file
5
config/04/config.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: https://dns.net
|
||||
15
config/04/output_ro.html
Normal file
15
config/04/output_ro.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<pre>╭────────────── Caption ───────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ <span style="color: #00aa00">Modified value</span> │
|
||||
│ (⏳ Original default value) │
|
||||
╰──────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┣━━ </span>📓 proxy_mode (Configure Proxy Access to the Internet): <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┗━━ </span>📂 dns_over_https (DNS over HTTPS)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 enable_dns_over_https (Enable DNS over HTTPS): <span style="color: #00aa00">true</span> ◀ loaded from the
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┃ </span>YAML file "config/04/config.yml" (⏳ false)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 provider (Use Provider): <span style="color: #00aa00">Custom</span> ◀ loaded from the YAML file
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┃ </span>"config/04/config.yml" (⏳ Cloudflare)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 custom_dns_url (Custom DNS URL): <span style="color: #00aa00">https://dns.net</span> ◀ loaded from the
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span>YAML file "config/04/config.yml"
|
||||
</pre>
|
||||
20
tree.html
20
tree.html
|
|
@ -1,12 +1,12 @@
|
|||
<p>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./">.</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/">firefox</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/30-auto.yml">30-auto.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_101/./firefox/60-dns_over_https.yml">60-dns_over_https.yml</a><br/>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./">.</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/">firefox</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/30-auto.yml">30-auto.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_102/./firefox/60-dns_over_https.yml">60-dns_over_https.yml</a><br/>
|
||||
<br/><br/></p>
|
||||
Loading…
Reference in a new issue