[tutorial v1.1_051)] A conditional disabled variable (config and doc)
This commit is contained in:
parent
7b5402dc67
commit
8e8e266bc7
2 changed files with 31 additions and 28 deletions
47
README.md
47
README.md
|
|
@ -1,9 +1,9 @@
|
||||||
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
|
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
|
||||||
- [[tutorial v1.1_044] A conditional disabled variable with identifier](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_044/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_044~1..v1.1_044))
|
- [[tutorial v1.1_050] A variable with type "web_address"](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_050~1..v1.1_050))
|
||||||
|
|
||||||
# [tutorial v1.1_050)] A variable with type "web_address"
|
# [tutorial v1.1_051)] A conditional disabled variable
|
||||||
|
|
||||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_050~1..v1.1_050)
|
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_051~1..v1.1_051)
|
||||||
|
|
||||||
|
|
||||||
## Screenshot
|
## Screenshot
|
||||||
|
|
@ -124,13 +124,16 @@ version: 1.1
|
||||||
auto:
|
auto:
|
||||||
description: Automatic proxy configuration URL
|
description: Automatic proxy configuration URL
|
||||||
type: web_address
|
type: web_address
|
||||||
|
disabled:
|
||||||
|
variable: _.proxy_mode
|
||||||
|
when_not: Automatic proxy configuration URL
|
||||||
...
|
...
|
||||||
|
|
||||||
```
|
```
|
||||||
### Let's generate the documentation
|
### Let's generate the documentation
|
||||||
|
|
||||||
```console
|
```console
|
||||||
foo@bar:~$ git switch --detach v1.1_050
|
foo@bar:~$ git switch --detach v1.1_051
|
||||||
foo@bar:~$ rougail -m firefox/ -o doc -do github
|
foo@bar:~$ rougail -m firefox/ -o doc -do github
|
||||||
```
|
```
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
|
|
@ -178,21 +181,21 @@ This family builds families dynamically
|
||||||
| **manual.*https*_proxy.port**<br/>**manual.*socks*_proxy.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *HTTPS* or *SOCKS* port.<br/>**Validators**: <br/>- well-known ports (1 to 1023) are allowed<br/>- registred ports (1024 to 49151) are allowed<br/>- private ports (greater than 49152) are allowed<br/>**Default**: the value of the variable "manual.http_proxy.port" |
|
| **manual.*https*_proxy.port**<br/>**manual.*socks*_proxy.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *HTTPS* or *SOCKS* port.<br/>**Validators**: <br/>- well-known ports (1 to 1023) are allowed<br/>- registred ports (1024 to 49151) are allowed<br/>- private ports (greater than 49152) are allowed<br/>**Default**: the value of the variable "manual.http_proxy.port" |
|
||||||
| **manual.*https*_proxy.version**<br/>**manual.*socks*_proxy.version**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | SOCKS host version used by proxy.<br/>**Choices**: <br/>- v4<br/>- v5 **← (default)**<br/>**Disabled**: when the identifier is "HTTPS" |
|
| **manual.*https*_proxy.version**<br/>**manual.*socks*_proxy.version**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | SOCKS host version used by proxy.<br/>**Choices**: <br/>- v4<br/>- v5 **← (default)**<br/>**Disabled**: when the identifier is "HTTPS" |
|
||||||
|
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| **auto**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Automatic proxy configuration URL.<br/>**Validator**: the domain name in web address can be only a hostname |
|
| **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" |
|
||||||
|
|
||||||
### Let's generate the changelog
|
### Let's generate the changelog
|
||||||
|
|
||||||
```console
|
```console
|
||||||
foo@bar:~$ git switch --detach v1.1_050
|
foo@bar:~$ git switch --detach v1.1_051
|
||||||
foo@bar:~$ rougail -m firefox/ -o doc --doc.contents changelog -do github
|
foo@bar:~$ rougail -m firefox/ -o doc --doc.contents changelog -do github
|
||||||
```
|
```
|
||||||
#### New variable
|
#### Modified variable
|
||||||
|
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| **auto**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Automatic proxy configuration URL.<br/>**Validator**: the domain name in web address can be only a hostname |
|
| **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> |
|
||||||
|
|
||||||
|
|
||||||
## User datas
|
## User datas
|
||||||
|
|
@ -210,16 +213,16 @@ auto: https://auto.proxy.net/wpad.dat
|
||||||
#### Output
|
#### Output
|
||||||
|
|
||||||
```console
|
```console
|
||||||
foo@bar:~$ git switch --detach v1.1_050
|
foo@bar:~$ git switch --detach v1.1_051
|
||||||
foo@bar:~$ rougail -m firefox/ -u yaml -ff config/01/config.yaml
|
foo@bar:~$ rougail -m firefox/ -u yaml -ff config/01/config.yaml
|
||||||
```
|
```
|
||||||
<pre>╭──────── Caption ────────╮
|
<pre><span style="font-weight: bold; color: #ffff00">🔔 WARNINGS</span>
|
||||||
│ Variable <span style="color: #ffd700">Default value</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"
|
||||||
│ Modified value │
|
╭─────── Caption ────────╮
|
||||||
╰─────────────────────────╯
|
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||||
|
╰────────────────────────╯
|
||||||
Variables:
|
Variables:
|
||||||
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
|
<span style="color: #5c5cff">┗━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
|
||||||
<span style="color: #5c5cff">┗━━ </span>📓 Automatic proxy configuration URL: https://auto.proxy.net/wpad.dat ◀ loaded from the YAML file "config/01/config.yaml"
|
|
||||||
</pre>
|
</pre>
|
||||||
### Example 2
|
### Example 2
|
||||||
|
|
||||||
|
|
@ -234,7 +237,7 @@ proxy_mode: Automatic proxy configuration URL
|
||||||
#### Output
|
#### Output
|
||||||
|
|
||||||
```console
|
```console
|
||||||
foo@bar:~$ git switch --detach v1.1_050
|
foo@bar:~$ git switch --detach v1.1_051
|
||||||
foo@bar:~$ rougail -m firefox/ -u yaml -ff config/02/config.yaml
|
foo@bar:~$ rougail -m firefox/ -u yaml -ff config/02/config.yaml
|
||||||
```
|
```
|
||||||
<pre><span style="font-weight: bold; color: #ff0000">🛑 ERRORS</span>
|
<pre><span style="font-weight: bold; color: #ff0000">🛑 ERRORS</span>
|
||||||
|
|
@ -255,7 +258,7 @@ auto: https://auto.proxy.net/wpad.dat
|
||||||
#### Output
|
#### Output
|
||||||
|
|
||||||
```console
|
```console
|
||||||
foo@bar:~$ git switch --detach v1.1_050
|
foo@bar:~$ git switch --detach v1.1_051
|
||||||
foo@bar:~$ rougail -m firefox/ -u yaml -ff config/03/config.yaml
|
foo@bar:~$ rougail -m firefox/ -u yaml -ff config/03/config.yaml
|
||||||
```
|
```
|
||||||
<pre>╭────────────── Caption ───────────────╮
|
<pre>╭────────────── Caption ───────────────╮
|
||||||
|
|
@ -268,4 +271,4 @@ Variables:
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
- [[tutorial v1.1_051] A conditional disabled variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_051/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_051~1..v1.1_051))
|
- [[tutorial v1.1_060] A variable with type "domainname", parameters type and disabled](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))
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<pre>╭──────── Caption ────────╮
|
<pre><span style="font-weight: bold; color: #ffff00">🔔 WARNINGS</span>
|
||||||
│ Variable <span style="color: #ffd700">Default value</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"
|
||||||
│ Modified value │
|
╭─────── Caption ────────╮
|
||||||
╰─────────────────────────╯
|
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||||
|
╰────────────────────────╯
|
||||||
Variables:
|
Variables:
|
||||||
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
|
<span style="color: #5c5cff">┗━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
|
||||||
<span style="color: #5c5cff">┗━━ </span>📓 Automatic proxy configuration URL: https://auto.proxy.net/wpad.dat ◀ loaded from the YAML file "config/01/config.yaml"
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue