[tutorial v1.1_070)] A variable with type "domainname", parameters type and disabled (config and doc)

This commit is contained in:
egarette@silique.fr 2025-11-07 06:37:29 +01:00
parent 9ee55f8183
commit ba9c117c2c
8 changed files with 52 additions and 57 deletions

View file

@ -1,9 +1,9 @@
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
- [[tutorial v1.1_060] A variable with type "web_address"](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_060/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_060~1..v1.1_060))
- [[tutorial v1.1_061] A conditional disabled variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_061~1..v1.1_061))
# [tutorial v1.1_061)] A conditional disabled variable
# [tutorial v1.1_070)] A variable with type "domainname", parameters type and disabled
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_061~1..v1.1_061)
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_070~1..v1.1_070)
## Screenshot
@ -129,11 +129,33 @@ auto:
when_not: Automatic proxy configuration URL
...
```
### firefox/40-no_proxy.yml
```yml
%YAML 1.2
---
version: 1.1
no_proxy:
description: Address for which proxy will be desactivated
type: domainname
params:
allow_ip: true
allow_cidr_network: true
allow_without_dot: true
allow_startswith_dot: true
disabled:
variable: _.proxy_mode
when: No proxy
...
```
### Let's generate the documentation
```console
foo@bar:~$ git switch --detach v1.1_061
foo@bar:~$ git switch --detach v1.1_070
foo@bar:~$ rougail -m firefox/ -o doc
```
| Variable                                                                                        | Description                                                                                     |
@ -184,18 +206,19 @@ This family builds families dynamically
| Variable                                                                                                          | Description                                                                                                       |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **auto**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | Automatic proxy configuration URL.<br/>**Validator**: the domain name in web address can be only a hostname<br/>**Disabled**: when the variable "proxy_mode" hasn't the value "Automatic proxy configuration URL" |
| **no_proxy**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | Address for which proxy will be desactivated.<br/>**Validators**: <br/>- the domain name can starts by a dot<br/>- the domain name can be a hostname<br/>- the domain name can be an IP<br/>- the domain name can be network in CIDR format<br/>**Disabled**: when the variable "proxy_mode" has the value "No proxy" |
### Let's generate the changelog
```console
foo@bar:~$ git switch --detach v1.1_061
foo@bar:~$ git switch --detach v1.1_070
foo@bar:~$ rougail -m firefox/ -o doc --doc.contents changelog
```
#### Modified variable
#### New variable
| Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **auto**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` <ins>*`disabled`*</ins> | Automatic proxy configuration URL.<br/>**Validator**: the domain name in web address can be only a hostname<br/>**Disabled**: <ins>{'message': 'when the variable "{0}" hasn\'t the value "Automatic proxy configuration URL"', 'path': {'path': 'proxy_mode'}, 'description': 'Configure Proxy Access to the Internet'}</ins> |
| Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **no_proxy**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | Address for which proxy will be desactivated.<br/>**Validators**: <br/>- the domain name can starts by a dot<br/>- the domain name can be a hostname<br/>- the domain name can be an IP<br/>- the domain name can be network in CIDR format<br/>**Disabled**: when the variable "proxy_mode" has the value "No proxy" |
## User datas
@ -207,18 +230,15 @@ foo@bar:~$ rougail -m firefox/ -o doc --doc.contents changelog
```yml
---
auto: https://auto.proxy.net/wpad.dat
```
#### Output
```console
foo@bar:~$ git switch --detach v1.1_061
foo@bar:~$ git switch --detach v1.1_070
foo@bar:~$ rougail -m firefox/ -u yaml -ff config/01/config.yaml
```
<pre><span style="font-weight: bold; color: #ffff00">🔔 WARNINGS</span>
<span style="color: #ffff00">┗━━ </span>variable "auto" (Automatic proxy configuration URL) is disabled, it will be ignored when loading from the YAML file "config/01/config.yaml"
╭─────── Caption ────────╮
<pre>╭─────── Caption ────────╮
│ Variable <span style="color: #ffd700">Default value</span>
╰────────────────────────╯
Variables:
@ -229,46 +249,28 @@ Variables:
#### config/02/config.yaml
```yml
---
proxy_mode: Automatic proxy configuration URL
```
#### Output
```console
foo@bar:~$ git switch --detach v1.1_061
foo@bar:~$ rougail -m firefox/ -u yaml -ff config/02/config.yaml
```
<pre><span style="font-weight: bold; color: #ff0000">🛑 ERRORS</span>
<span style="color: #ff0000">┗━━ </span>The following variables are mandatory but have no value:
<span style="color: #ff0000"> </span><span style="color: #ff0000">┗━━ </span>Automatic proxy configuration URL
</pre>
### Example 3
#### config/03/config.yaml
```yml
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat
no_proxy: 192.168.1.0/24
```
#### Output
```console
foo@bar:~$ git switch --detach v1.1_061
foo@bar:~$ rougail -m firefox/ -u yaml -ff config/03/config.yaml
foo@bar:~$ git switch --detach v1.1_070
foo@bar:~$ rougail -m firefox/ -u yaml -ff config/02/config.yaml
```
<pre>╭────────────── Caption ───────────────╮
│ Variable Modified value │
│ (<span style="color: #00aa00">⏳ Original default value</span>) │
╰──────────────────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: Automatic proxy configuration URL ◀ loaded from the YAML file "config/03/config.yaml" (⏳ <span style="color: #00aa00">No proxy</span>)
<span style="color: #5c5cff">┗━━ </span>📓 Automatic proxy configuration URL: https://auto.proxy.net/wpad.dat ◀ loaded from the YAML file "config/03/config.yaml"
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: Automatic proxy configuration URL ◀ loaded from the YAML file "config/02/config.yaml" (⏳ <span style="color: #00aa00">No proxy</span>)
<span style="color: #5c5cff">┣━━ </span>📓 Automatic proxy configuration URL: https://auto.proxy.net/wpad.dat ◀ loaded from the YAML file "config/02/config.yaml"
<span style="color: #5c5cff">┗━━ </span>📓 Address for which proxy will be desactivated: 192.168.1.0/24 ◀ loaded from the YAML file "config/02/config.yaml"
</pre>
- [[tutorial v1.1_070] A variable with type "domainname", parameters type and disabled](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_070~1..v1.1_070))
- [[tutorial v1.1_071] A variable with multiple value](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_071/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_071~1..v1.1_071))

View file

@ -1,2 +1 @@
---
auto: https://auto.proxy.net/wpad.dat

View file

@ -1,6 +1,4 @@
<pre><span style="font-weight: bold; color: #ffff00">🔔 WARNINGS</span>
<span style="color: #ffff00">┗━━ </span>variable "auto" (Automatic proxy configuration URL) is disabled, it will be ignored when loading from the YAML file "config/01/config.yaml"
╭─────── Caption ────────╮
<pre>╭─────── Caption ────────╮
│ Variable <span style="color: #ffd700">Default value</span>
╰────────────────────────╯
Variables:

View file

@ -1,2 +1,4 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat
no_proxy: 192.168.1.0/24

View file

@ -1,4 +1,9 @@
<pre><span style="font-weight: bold; color: #ff0000">🛑 ERRORS</span>
<span style="color: #ff0000">┗━━ </span>The following variables are mandatory but have no value:
<span style="color: #ff0000"> </span><span style="color: #ff0000">┗━━ </span>Automatic proxy configuration URL
<pre>╭────────────── Caption ───────────────╮
│ Variable Modified value │
│ (<span style="color: #00aa00">⏳ Original default value</span>) │
╰──────────────────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: Automatic proxy configuration URL ◀ loaded from the YAML file "config/02/config.yaml" (⏳ <span style="color: #00aa00">No proxy</span>)
<span style="color: #5c5cff">┣━━ </span>📓 Automatic proxy configuration URL: https://auto.proxy.net/wpad.dat ◀ loaded from the YAML file "config/02/config.yaml"
<span style="color: #5c5cff">┗━━ </span>📓 Address for which proxy will be desactivated: 192.168.1.0/24 ◀ loaded from the YAML file "config/02/config.yaml"
</pre>

View file

@ -1,3 +0,0 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat

View file

@ -1,8 +0,0 @@
<pre>╭────────────── Caption ───────────────╮
│ Variable Modified value │
│ (<span style="color: #00aa00">⏳ Original default value</span>) │
╰──────────────────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: Automatic proxy configuration URL ◀ loaded from the YAML file "config/03/config.yaml" (⏳ <span style="color: #00aa00">No proxy</span>)
<span style="color: #5c5cff">┗━━ </span>📓 Automatic proxy configuration URL: https://auto.proxy.net/wpad.dat ◀ loaded from the YAML file "config/03/config.yaml"
</pre>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB