[tutorial v1.1_022)] Putting a variable inside of a family or a sub family (config and doc)

This commit is contained in:
egarette@silique.fr 2025-12-01 22:21:35 +01:00
parent 79db2ddbaf
commit 9a4e6684bc
11 changed files with 170 additions and 17 deletions

134
README.md
View file

@ -1,11 +1,11 @@
- [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_020] Creating a new family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_020/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_020~1..v1.1_020)) - [[tutorial v1.1_021] Or a sub family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_021/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_021~1..v1.1_021))
# [tutorial v1.1_021)] Or a sub family # [tutorial v1.1_022)] Putting a variable inside of a family or a sub family
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_021~1..v1.1_021) [View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_022~1..v1.1_022)
[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/proxymode.html#or-a-sub-family) [Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/proxymode.html#putting-a-variable-inside-of-a-family-or-a-sub-family)
## Screenshot ## Screenshot
@ -31,7 +31,7 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user-
Then switch to the tutorial page: Then switch to the tutorial page:
```shell ```shell
git switch --detach v1.1_021 git switch --detach v1.1_022
``` ```
## Structure ## Structure
@ -39,10 +39,10 @@ git switch --detach v1.1_021
<p> <p>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_021/./">.</a><br/> <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_022/./">.</a><br/>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_021/./firefox/">firefox</a><br/> └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_022/./firefox/">firefox</a><br/>
    ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_021/./firefox/00-proxy.yml">00-proxy.yml</a><br/>     ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_022/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
    └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_021/./firefox/10-manual.yml">10-manual.yml</a><br/>     └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_022/./firefox/10-manual.yml">10-manual.yml</a><br/>
<br/><br/></p> <br/><br/></p>
Contents of the firefox/10-manual.yml file Contents of the firefox/10-manual.yml file
@ -54,9 +54,9 @@ version: 1.1
manual: # Manual proxy configuration manual: # Manual proxy configuration
http_proxy: http_proxy: # HTTP Proxy
description: HTTP Proxy
type: family address: # HTTP address
... ...
``` ```
@ -69,6 +69,114 @@ rougail -m firefox/ -o doc
|------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="proxy_mode" name="proxy_mode">proxy_mode</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.<br/>**Choices**: <br/>&nbsp;No proxy **← (default)**<br/>&nbsp;Auto-detect proxy settings for this network<br/>&nbsp;Use system proxy settings<br/>&nbsp;Manual proxy configuration<br/>&nbsp;Automatic proxy configuration URL | | **<a id="proxy_mode" name="proxy_mode">proxy_mode</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.<br/>**Choices**: <br/>&nbsp;No proxy **← (default)**<br/>&nbsp;Auto-detect proxy settings for this network<br/>&nbsp;Use system proxy settings<br/>&nbsp;Manual proxy configuration<br/>&nbsp;Automatic proxy configuration URL |
#### Manual proxy configuration
> **🛈 Informations**
>
> **<a id="manual" name="manual">manual</a>**
##### HTTP Proxy
> **🛈 Informations**
>
> **<a id="manual.http_proxy" name="manual.http_proxy">manual.http_proxy</a>**
| Variable | Description |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| **<a id="manual.http_proxy.address" name="manual.http_proxy.address">manual.http_proxy.address</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP address. |
### Let's generate the changelog
```shell
rougail -m firefox/ -o doc --doc.contents changelog
```
#### New variable
| Variable | Description |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| **<a id="manual.http_proxy.address" name="manual.http_proxy.address">manual.http_proxy.address</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP address. |
- [[tutorial v1.1_022] Putting a variable inside of a family or a sub family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_022/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_022~1..v1.1_022)) ## User datas
### Example 1
#### config/01/config.yml
```yml
---
```
#### Output
```shell
rougail -m firefox/ -u yaml -yf config/01/config.yml
```
<pre>╭─────── Caption ────────╮
│ Variable <span style="color: #ffd700">Default value</span>
╰────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
<span style="color: #5c5cff">┗━━ </span>📂 Manual proxy configuration
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 HTTP Proxy
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 HTTP address: <span style="color: #ffd700">null</span>
</pre>
### Example 2
#### config/02/config.yml
```yml
---
manual:
http_proxy:
address: example.net
```
#### Output
```shell
rougail -m firefox/ -u yaml -yf config/02/config.yml
```
<pre>╭──────── Caption ────────╮
│ Variable <span style="color: #ffd700">Default value</span>
<span style="color: #00aa00">Modified value</span>
╰─────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
<span style="color: #5c5cff">┗━━ </span>📂 Manual proxy configuration
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 HTTP Proxy
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 HTTP address: <span style="color: #00aa00">example.net</span> ◀ loaded from the YAML file "config/02/config.yml"
</pre>
### Example 3
#### config/03/config.yml
```yml
---
manual:
http_proxy:
address: example.net
port: 3128
```
#### Output
```shell
rougail -m firefox/ -u yaml -yf config/03/config.yml
```
<pre><span style="font-weight: bold; color: #ffff00">🔔 WARNINGS</span>
<span style="color: #ffff00">┗━━ </span>variable or family "manual.http_proxy.port" does not exist, it will be ignored when loading from the YAML file
<span style="color: #ffff00"> </span>"config/03/config.yml"
╭──────── Caption ────────╮
│ Variable <span style="color: #ffd700">Default value</span>
<span style="color: #00aa00">Modified value</span>
╰─────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
<span style="color: #5c5cff">┗━━ </span>📂 Manual proxy configuration
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 HTTP Proxy
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 HTTP address: <span style="color: #00aa00">example.net</span> ◀ loaded from the YAML file "config/03/config.yml"
</pre>
- [[tutorial v1.1_030] A variable with type "domainname"](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_030/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_030~1..v1.1_030))

1
config/01/cmd_ro.txt Normal file
View file

@ -0,0 +1 @@
rougail -m firefox/ -u yaml -yf config/01/config.yml

1
config/01/config.yml Normal file
View file

@ -0,0 +1 @@
---

9
config/01/output_ro.html Normal file
View file

@ -0,0 +1,9 @@
<pre>╭─────── Caption ────────╮
│ Variable <span style="color: #ffd700">Default value</span>
╰────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
<span style="color: #5c5cff">┗━━ </span>📂 Manual proxy configuration
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 HTTP Proxy
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 HTTP address: <span style="color: #ffd700">null</span>
</pre>

1
config/02/cmd_ro.txt Normal file
View file

@ -0,0 +1 @@
rougail -m firefox/ -u yaml -yf config/02/config.yml

4
config/02/config.yml Normal file
View file

@ -0,0 +1,4 @@
---
manual:
http_proxy:
address: example.net

10
config/02/output_ro.html Normal file
View file

@ -0,0 +1,10 @@
<pre>╭──────── Caption ────────╮
│ Variable <span style="color: #ffd700">Default value</span>
<span style="color: #00aa00">Modified value</span>
╰─────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
<span style="color: #5c5cff">┗━━ </span>📂 Manual proxy configuration
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 HTTP Proxy
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 HTTP address: <span style="color: #00aa00">example.net</span> ◀ loaded from the YAML file "config/02/config.yml"
</pre>

1
config/03/cmd_ro.txt Normal file
View file

@ -0,0 +1 @@
rougail -m firefox/ -u yaml -yf config/03/config.yml

5
config/03/config.yml Normal file
View file

@ -0,0 +1,5 @@
---
manual:
http_proxy:
address: example.net
port: 3128

13
config/03/output_ro.html Normal file
View file

@ -0,0 +1,13 @@
<pre><span style="font-weight: bold; color: #ffff00">🔔 WARNINGS</span>
<span style="color: #ffff00">┗━━ </span>variable or family "manual.http_proxy.port" does not exist, it will be ignored when loading from the YAML file
<span style="color: #ffff00"> </span>"config/03/config.yml"
╭──────── Caption ────────╮
│ Variable <span style="color: #ffd700">Default value</span>
<span style="color: #00aa00">Modified value</span>
╰─────────────────────────╯
Variables:
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
<span style="color: #5c5cff">┗━━ </span>📂 Manual proxy configuration
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 HTTP Proxy
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 HTTP address: <span style="color: #00aa00">example.net</span> ◀ loaded from the YAML file "config/03/config.yml"
</pre>

View file

@ -25,10 +25,10 @@
</head> </head>
<body> <body>
<h1>Directory Tree</h1><p> <h1>Directory Tree</h1><p>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_021/./">.</a><br> <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_022/./">.</a><br>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_021/./firefox/">firefox</a><br> └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_022/./firefox/">firefox</a><br>
&nbsp;&nbsp;&nbsp; ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_021/./firefox/00-proxy.yml">00-proxy.yml</a><br> &nbsp;&nbsp;&nbsp; ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_022/./firefox/00-proxy.yml">00-proxy.yml</a><br>
&nbsp;&nbsp;&nbsp; └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_021/./firefox/10-manual.yml">10-manual.yml</a><br> &nbsp;&nbsp;&nbsp; └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_022/./firefox/10-manual.yml">10-manual.yml</a><br>
<br><br><p> <br><br><p>
2 directories, 2 files 2 directories, 2 files