[tutorial v1.1_002] Describe the variable (config and doc)
This commit is contained in:
parent
d3eb655512
commit
63b454651e
9 changed files with 42 additions and 55 deletions
61
README.md
61
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_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_001~1..v1.1_001))
|
- [[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_002~1..v1.1_002))
|
||||||
|
|
||||||
# [tutorial v1.1_001] Let’s add our first variable
|
# [tutorial v1.1_002] Describe the variable
|
||||||
|
|
||||||
[Read the tutorial "Let’s add our first variable" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/preliminary.html#let-s-add-our-first-variable)
|
[Read the tutorial "Describe the variable" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/preliminary.html#describe-the-variable)
|
||||||
|
|
||||||
|
|
||||||
## Screenshot
|
## Screenshot
|
||||||
|
|
@ -29,7 +29,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_001
|
git switch --detach v1.1_002
|
||||||
```
|
```
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
@ -37,9 +37,9 @@ git switch --detach v1.1_001
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_001/./">.</a><br/>
|
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_002/./">.</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_001/./firefox/">firefox</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_002/./firefox/">firefox</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_001/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_002/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||||
<br/><br/></p>
|
<br/><br/></p>
|
||||||
|
|
||||||
Contents of the firefox/00-proxy.yml file
|
Contents of the firefox/00-proxy.yml file
|
||||||
|
|
@ -49,7 +49,7 @@ Contents of the firefox/00-proxy.yml file
|
||||||
---
|
---
|
||||||
version: 1.1
|
version: 1.1
|
||||||
|
|
||||||
proxy_mode:
|
proxy_mode: # Configure Proxy Access to the Internet
|
||||||
...
|
...
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -60,9 +60,9 @@ proxy_mode:
|
||||||
```shell
|
```shell
|
||||||
rougail -m firefox/ -o doc
|
rougail -m firefox/ -o doc
|
||||||
```
|
```
|
||||||
| Variable |
|
| 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` |
|
| **<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. |
|
||||||
|
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
@ -71,11 +71,11 @@ rougail -m firefox/ -o doc
|
||||||
```shell
|
```shell
|
||||||
rougail -m firefox/ -o doc --doc.contents changelog --doc.changelog.previous_json_file previous.yml
|
rougail -m firefox/ -o doc --doc.contents changelog --doc.changelog.previous_json_file previous.yml
|
||||||
```
|
```
|
||||||
#### New variable
|
#### Modified variable
|
||||||
|
|
||||||
| Variable |
|
| 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` |
|
| **<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> |
|
||||||
|
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
@ -98,7 +98,7 @@ rougail -m firefox/ -u yaml -yf config/01/config.yml
|
||||||
```
|
```
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
>
|
>
|
||||||
> - proxy_mode: :stop_sign: <span style="color: #C23636">mandatory variable but has no value</span>
|
> - proxy_mode (Configure Proxy Access to the Internet): :stop_sign: <span style="color: #C23636">mandatory variable but has no value</span>
|
||||||
|
|
||||||
***
|
***
|
||||||
#### Output in read write mode
|
#### Output in read write mode
|
||||||
|
|
@ -113,7 +113,7 @@ rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.read_write
|
||||||
> - <span style="color: #B8860B">Default value</span>
|
> - <span style="color: #B8860B">Default value</span>
|
||||||
|
|
||||||
Variables:
|
Variables:
|
||||||
- :notebook: proxy_mode: <span style="color: #B8860B">null</span>
|
- :notebook: proxy_mode (Configure Proxy Access to the Internet): <span style="color: #B8860B">null</span>
|
||||||
|
|
||||||
***
|
***
|
||||||
### Example 2
|
### Example 2
|
||||||
|
|
@ -139,7 +139,7 @@ rougail -m firefox/ -u yaml -yf config/02/config.yml
|
||||||
> - <span style="color: #006400">Modified value</span>
|
> - <span style="color: #006400">Modified value</span>
|
||||||
|
|
||||||
Variables:
|
Variables:
|
||||||
- :notebook: proxy_mode: <span style="color: #006400">No proxy</span> ← loaded from the YAML file "config/02/config.yml"
|
- :notebook: proxy_mode (Configure Proxy Access to the Internet): <span style="color: #006400">No proxy</span> ← loaded from the YAML file "config/02/config.yml"
|
||||||
|
|
||||||
***
|
***
|
||||||
### Example 3
|
### Example 3
|
||||||
|
|
@ -149,7 +149,7 @@ Variables:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
---
|
---
|
||||||
proxy_mode: 1
|
proxy_mode: foo
|
||||||
```
|
```
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
@ -158,25 +158,16 @@ proxy_mode: 1
|
||||||
```shell
|
```shell
|
||||||
rougail -m firefox/ -u yaml -yf config/03/config.yml
|
rougail -m firefox/ -u yaml -yf config/03/config.yml
|
||||||
```
|
```
|
||||||
> [!CAUTION]
|
> [!NOTE]
|
||||||
>
|
>
|
||||||
> - proxy_mode
|
> **Caption:**
|
||||||
> - <span style='color: #EFBF04'>:bell: the value "1" is an invalid string, it's not a string, it will be ignored when loading from the YAML file "config/03/config.yml"</span>
|
> - Variable
|
||||||
> - <span style='color: #C23636'>:stop_sign: mandatory variable but has no value</span>
|
> - <span style="color: #006400">Modified value</span>
|
||||||
|
|
||||||
***
|
Variables:
|
||||||
#### Output when invalid user data is an error
|
- :notebook: proxy_mode (Configure Proxy Access to the Internet): <span style="color: #006400">foo</span> ← loaded from the YAML file "config/03/config.yml"
|
||||||
|
|
||||||
```shell
|
|
||||||
rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_data_error
|
|
||||||
```
|
|
||||||
> [!CAUTION]
|
|
||||||
>
|
|
||||||
> - proxy_mode
|
|
||||||
> - <span style='color: #C23636'>:stop_sign: the value "1" is an invalid string, it's not a string, it has been loading from the YAML file "config/03/config.yml"</span>
|
|
||||||
> - <span style='color: #C23636'>:stop_sign: mandatory variable but has no value</span>
|
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
|
||||||
- [[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))
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
<pre><span style="font-weight: bold; color: #ff0000">🛑 Caution</span>
|
<pre><span style="font-weight: bold; color: #ff0000">🛑 Caution</span>
|
||||||
<span style="color: #ff0000">┗━━ </span>proxy_mode: <span style="color: #ff0000">🛑 mandatory variable but has no value</span>
|
<span style="color: #ff0000">┗━━ </span>proxy_mode (Configure Proxy Access to the Internet): <span style="color: #ff0000">🛑 mandatory variable </span>
|
||||||
|
<span style="color: #ff0000"> </span><span style="color: #ff0000">but has no value</span>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,5 @@
|
||||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||||
╰────────────────────────╯
|
╰────────────────────────╯
|
||||||
Variables:
|
Variables:
|
||||||
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode: <span style="color: #ffd700">null</span>
|
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode (Configure Proxy Access to the Internet): <span style="color: #ffd700">null</span>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,6 @@
|
||||||
│ Variable <span style="color: #00aa00">Modified value</span> │
|
│ Variable <span style="color: #00aa00">Modified value</span> │
|
||||||
╰─────────────────────────╯
|
╰─────────────────────────╯
|
||||||
Variables:
|
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>📓 proxy_mode (Configure Proxy Access to the Internet): <span style="color: #00aa00">No proxy</span> ◀ loaded
|
||||||
|
<span style="color: #5c5cff"> </span>from the YAML file "config/02/config.yml"
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_data_error
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
---
|
---
|
||||||
proxy_mode: 1
|
proxy_mode: foo
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<pre><span style="font-weight: bold; color: #ff0000">🛑 Caution</span>
|
|
||||||
<span style="color: #ff0000">┗━━ </span>proxy_mode
|
|
||||||
<span style="color: #ff0000"> </span><span style="color: #ff0000">┣━━ </span><span style="color: #ff0000">🛑 the value "1" is an invalid string, it's not a string, it has been </span>
|
|
||||||
<span style="color: #ff0000"> </span><span style="color: #ff0000">┃ </span><span style="color: #ff0000">loading from the YAML file "config/03/config.yml"</span>
|
|
||||||
<span style="color: #ff0000"> </span><span style="color: #ff0000">┗━━ </span><span style="color: #ff0000">🛑 mandatory variable but has no value</span>
|
|
||||||
</pre>
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<pre><span style="font-weight: bold; color: #ff0000">🛑 Caution</span>
|
<pre>╭──────── Caption ────────╮
|
||||||
<span style="color: #ff0000">┗━━ </span>proxy_mode
|
│ Variable <span style="color: #00aa00">Modified value</span> │
|
||||||
<span style="color: #ff0000"> </span><span style="color: #ff0000">┣━━ </span><span style="color: #ffff00">🔔 the value "1" is an invalid string, it's not a string, it will be </span>
|
╰─────────────────────────╯
|
||||||
<span style="color: #ff0000"> </span><span style="color: #ff0000">┃ </span><span style="color: #ffff00">ignored when loading from the YAML file "config/03/config.yml"</span>
|
Variables:
|
||||||
<span style="color: #ff0000"> </span><span style="color: #ff0000">┗━━ </span><span style="color: #ff0000">🛑 mandatory variable but has no value</span>
|
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode (Configure Proxy Access to the Internet): <span style="color: #00aa00">foo</span> ◀ loaded from
|
||||||
|
<span style="color: #5c5cff"> </span>the YAML file "config/03/config.yml"
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<p>
|
<p>
|
||||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_001/./">.</a><br/>
|
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_002/./">.</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_001/./firefox/">firefox</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_002/./firefox/">firefox</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_001/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_002/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||||
<br/><br/></p>
|
<br/><br/></p>
|
||||||
Loading…
Reference in a new issue