@ -1,11 +1,11 @@
- [Summary ](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md )
- [[tutorial v1.1_000] Creating a structure file](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_000/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_000~1..v1.1_000 ))
- [[tutorial v1.1_001] Let’ s add our first variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_001/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_001~1..v1.1_001 ))
# [tutorial v1.1_001)] Let’ s add our first variable
# [tutorial v1.1_002)] Describe the variable
[View the diff ](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_00 1~1..v1.1_001 )
[View the diff ](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_00 2~1..v1.1_002 )
[Read the documentation ](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/preliminary.html# let-s-add-our-first -variable)
[Read the documentation ](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/preliminary.html# describe-the -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_001
git switch --detach v1.1_002
```
## Structure
@ -39,9 +39,9 @@ git switch --detach v1.1_001
< p >
< a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_00 1 /./"> .< / a > < br / >
└── < a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_00 1 /./firefox/"> firefox< / a > < br / >
└── < a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_00 1 /./firefox/00-proxy.yml"> 00-proxy.yml< / a > < br / >
< a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_00 2 /./"> .< / a > < br / >
└── < a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_00 2 /./firefox/"> firefox< / a > < br / >
└── < a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_00 2 /./firefox/00-proxy.yml"> 00-proxy.yml< / a > < br / >
< br / > < br / > < / p >
Contents of the firefox/00-proxy.yml file
@ -51,7 +51,7 @@ Contents of the firefox/00-proxy.yml file
---
version: 1.1
proxy_mode:
proxy_mode: # Configure Proxy Access to the Internet
...
```
@ -60,20 +60,20 @@ proxy_mode:
```shell
rougail -m firefox/ -o doc
```
| Variable |
|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ** < a id = "proxy_mode" name = "proxy_mode" > proxy_mode</ a > **< br /> [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` |
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------|
| ** < a id = "proxy_mode" name = "proxy_mode" > proxy_mode</ a > **< br /> [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet. |
### Let's generate the changelog
```shell
rougail -m firefox/ -o doc --doc.contents changelog
```
#### New variable
#### Modified variable
| Variable |
|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ** < a id = "proxy_mode" name = "proxy_mode" > proxy_mode</ a > **< br /> [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` |
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------|
| ** < a id = "proxy_mode" name = "proxy_mode" > proxy_mode</ a > **< br /> [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | < ins > Configure Proxy Access to the Internet.</ ins > |
## User datas
@ -95,7 +95,7 @@ rougail -m firefox/ -u yaml -yf config/01/config.yml
│ Variable < span style = "color: #ffd700 " > Default value</ span > │
╰────────────────────────╯
Variables:
< span style = "color: #5c5cff " > ┗━━ </ span > 📓 proxy_mode : < span style = "color: #ffd700 " > null</ span >
< span style = "color: #5c5cff " > ┗━━ </ span > 📓 Configure Proxy Access to the Internet : < span style = "color: #ffd700 " > null</ span >
< / pre >
#### Output in read write mode
@ -106,7 +106,7 @@ rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.read_write
│ Variable < span style = "color: #ffd700 " > Default value</ span > │
╰────────────────────────╯
Variables:
< span style = "color: #5c5cff " > ┗━━ </ span > 📓 proxy_mode : < span style = "color: #ffd700 " > null</ span >
< span style = "color: #5c5cff " > ┗━━ </ span > 📓 Configure Proxy Access to the Internet : < span style = "color: #ffd700 " > null</ span >
< / pre >
### Example 2
@ -126,7 +126,8 @@ rougail -m firefox/ -u yaml -yf config/02/config.yml
│ Variable < span style = "color: #00aa00 " > Modified value</ span > │
╰─────────────────────────╯
Variables:
< span style = "color: #5c5cff " > ┗━━ </ span > 📓 proxy_mode: < span style = "color: #00aa00 " > No proxy</ span > ◀ loaded from the YAML file "config/02/config.yml"
< span style = "color: #5c5cff " > ┗━━ </ span > 📓 Configure Proxy Access to the Internet: < span style = "color: #00aa00 " > No proxy</ span > ◀ loaded from the YAML
< span style = "color: #5c5cff " > </ span > file "config/02/config.yml"
< / pre >
### Example 3
@ -135,31 +136,20 @@ Variables:
```yml
---
proxy_mode: 1
proxy_mode: foo
```
#### 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 > the value "1" is an invalid string for "proxy_mode", which is not a string,
< span style = "color: #ffff00 " > </ span > it will be ignored when loading from the YAML file "config/03/config.yml"
╭─────── Caption ────────╮
│ Variable < span style = "color: #ffd700 " > Default value</ span > │
╰────────────────────────╯
< pre > ╭──────── Caption ────────╮
│ Variable < span style = "color: #00aa00 " > Modified value</ span > │
╰─────────────────────────╯
Variables:
< span style = "color: #5c5cff " > ┗━━ </ span > 📓 proxy_mode: < span style = "color: #ffd700 " > null</ span >
< / pre >
#### Output when invalid user datas is an error
```shell
rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_datas_error
```
< pre >< span style = "font-weight: bold; color: #ff0000 " > 🛑 ERRORS</ span >
< span style = "color: #ff0000 " > ┗━━ </ span > the value "1" is an invalid string for "proxy_mode", which is not a string,
< span style = "color: #ff0000 " > </ span > it will be ignored when loading from the YAML file "config/03/config.yml"
< span style = "color: #5c5cff " > ┗━━ </ span > 📓 Configure Proxy Access to the Internet: < span style = "color: #00aa00 " > foo</ span > ◀ loaded from the YAML file
< span style = "color: #5c5cff " > </ span > "config/03/config.yml"
< / pre >
- [[tutorial v1.1_002] Describe the variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_002/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_002~1..v1.1_002 ))
- [[tutorial v1.1_003] Set a default value](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_003/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_003~1..v1.1_003))