[tutorial v1.1_050)] A calculated default value (config and doc)
This commit is contained in:
parent
cfe071f5a2
commit
575c3d1158
6 changed files with 37 additions and 64 deletions
75
README.md
75
README.md
|
|
@ -1,11 +1,11 @@
|
|||
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
|
||||
- [[tutorial v1.1_042] Copy HTTP manual proxy to HTTPS manual proxy](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_042/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_042~1..v1.1_042))
|
||||
- [[tutorial v1.1_043] A conditional hidden family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_043~1..v1.1_043))
|
||||
|
||||
# [tutorial v1.1_043)] A conditional hidden family
|
||||
# [tutorial v1.1_050)] A calculated default value
|
||||
|
||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_043~1..v1.1_043)
|
||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_050~1..v1.1_050)
|
||||
|
||||
[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/disabled.html#a-conditional-hidden-family)
|
||||
[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/disabled.html#a-calculated-default-value)
|
||||
|
||||
|
||||
## 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_043
|
||||
git switch --detach v1.1_050
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
|
@ -39,11 +39,11 @@ git switch --detach v1.1_043
|
|||
|
||||
|
||||
<p>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/./">.</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/./firefox/">firefox</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/./">.</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/./firefox/">firefox</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||
<br/><br/></p>
|
||||
|
||||
Contents of the firefox/20-manual.yml file
|
||||
|
|
@ -64,14 +64,13 @@ manual:
|
|||
|
||||
address:
|
||||
description: HTTPS address
|
||||
type: domainname
|
||||
params:
|
||||
allow_ip: true
|
||||
default:
|
||||
variable: __.http_proxy.address
|
||||
|
||||
port:
|
||||
description: HTTPS Port
|
||||
type: port
|
||||
default: 8080
|
||||
default:
|
||||
variable: __.http_proxy.port
|
||||
...
|
||||
|
||||
```
|
||||
|
|
@ -117,8 +116,21 @@ rougail -m firefox/ -o doc
|
|||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **manual.https_proxy.address**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS address.<br/>**Validator**: the domain name can be an IP |
|
||||
| **manual.https_proxy.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS 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**: 8080 |
|
||||
| **manual.https_proxy.address**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS address.<br/>**Validator**: the domain name can be an IP<br/>**Default**: the value of the variable "manual.http_proxy.address" |
|
||||
| **manual.https_proxy.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS 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" |
|
||||
|
||||
### Let's generate the changelog
|
||||
|
||||
```shell
|
||||
rougail -m firefox/ -o doc --doc.contents changelog
|
||||
```
|
||||
#### Modified variables
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **manual.https_proxy.address**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS address.<br/>**Validator**: the domain name can be an IP<br/>**Default**: <ins>the value of the variable "manual.http_proxy.address"</ins> |
|
||||
| **manual.https_proxy.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS 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**: ~~8080~~<br/><ins>the value of the variable "manual.http_proxy.port"</ins> |
|
||||
|
||||
|
||||
## User datas
|
||||
|
||||
|
|
@ -158,34 +170,9 @@ Variables:
|
|||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┃ </span><span style="color: #5c5cff">┗━━ </span>📓 HTTP Port: <span style="color: #ffd700">8080</span>
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Also use this proxy for HTTPS: false ◀ loaded from the YAML file "config/01/config.yml" (⏳ <span style="color: #00aa00">true</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 HTTPS Proxy
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 HTTPS address: https.proxy.net ◀ loaded from the YAML file "config/01/config.yml"
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 HTTPS address: https.proxy.net ◀ loaded from the YAML file "config/01/config.yml" (⏳ <span style="color: #00aa00">http.proxy.net</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 HTTPS Port: <span style="color: #ffd700">8080</span>
|
||||
</pre>
|
||||
### Example 2
|
||||
|
||||
#### config/02/config.yml
|
||||
|
||||
|
||||
```yml
|
||||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: http.proxy.net
|
||||
port: 3128
|
||||
use_for_https: true
|
||||
```
|
||||
#### Output
|
||||
|
||||
```shell
|
||||
rougail -m firefox/ -u yaml -yf config/02/config.yml
|
||||
```
|
||||
<pre><span style="font-weight: bold; color: #ffff00">🔔 WARNINGS</span>
|
||||
<span style="color: #ffff00">┗━━ </span>the value "3128" is an invalid port for "manual.http_proxy.port" (HTTP Port), which is not a string, it will be ignored when loading from the YAML file "config/02/config.yml"
|
||||
<span style="font-weight: bold; color: #ff0000">🛑 ERRORS</span>
|
||||
<span style="color: #ff0000">┗━━ </span>The following variables are inaccessible but are empty and mandatory:
|
||||
<span style="color: #ff0000"> </span><span style="color: #ff0000">┗━━ </span>manual.https_proxy.address (HTTPS address)
|
||||
</pre>
|
||||
|
||||
|
||||
- [[tutorial v1.1_050] A calculated default value](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_060] Family: a dynamic family](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))
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ Variables:
|
|||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┃ </span><span style="color: #5c5cff">┗━━ </span>📓 HTTP Port: <span style="color: #ffd700">8080</span>
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Also use this proxy for HTTPS: false ◀ loaded from the YAML file "config/01/config.yml" (⏳ <span style="color: #00aa00">true</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 HTTPS Proxy
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 HTTPS address: https.proxy.net ◀ loaded from the YAML file "config/01/config.yml"
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 HTTPS address: https.proxy.net ◀ loaded from the YAML file "config/01/config.yml" (⏳ <span style="color: #00aa00">http.proxy.net</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 HTTPS Port: <span style="color: #ffd700">8080</span>
|
||||
</pre>
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
rougail -m firefox/ -u yaml -yf config/02/config.yml
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: http.proxy.net
|
||||
port: 3128
|
||||
use_for_https: true
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<pre><span style="font-weight: bold; color: #ffff00">🔔 WARNINGS</span>
|
||||
<span style="color: #ffff00">┗━━ </span>the value "3128" is an invalid port for "manual.http_proxy.port" (HTTP Port), which is not a string, it will be ignored when loading from the YAML file "config/02/config.yml"
|
||||
<span style="font-weight: bold; color: #ff0000">🛑 ERRORS</span>
|
||||
<span style="color: #ff0000">┗━━ </span>The following variables are inaccessible but are empty and mandatory:
|
||||
<span style="color: #ff0000"> </span><span style="color: #ff0000">┗━━ </span>manual.https_proxy.address (HTTPS address)
|
||||
</pre>
|
||||
10
tree.html
10
tree.html
|
|
@ -25,11 +25,11 @@
|
|||
</head>
|
||||
<body>
|
||||
<h1>Directory Tree</h1><p>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/./">.</a><br>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/./firefox/">firefox</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/./firefox/00-proxy.yml">00-proxy.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/./firefox/10-manual.yml">10-manual.yml</a><br>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_043/./firefox/20-manual.yml">20-manual.yml</a><br>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/./">.</a><br>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/./firefox/">firefox</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/./firefox/00-proxy.yml">00-proxy.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/./firefox/10-manual.yml">10-manual.yml</a><br>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/./firefox/20-manual.yml">20-manual.yml</a><br>
|
||||
<br><br><p>
|
||||
|
||||
2 directories, 3 files
|
||||
|
|
|
|||
Loading…
Reference in a new issue