[tutorial v1.1_070] A conditional hidden family with Jinja (config and doc)
This commit is contained in:
parent
8f0c19e800
commit
8fe00bf57d
5 changed files with 52 additions and 31 deletions
60
README.md
60
README.md
|
|
@ -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_060] A dynamically built 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))
|
- [[tutorial v1.1_061] A conditional disabled variable with dynamic identifier](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_061~1..v1.1_061))
|
||||||
|
|
||||||
# [tutorial v1.1_061] A conditional disabled variable with dynamic identifier
|
# [tutorial v1.1_070] A conditional hidden family with Jinja
|
||||||
|
|
||||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_061~1..v1.1_061)
|
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_070~1..v1.1_070)
|
||||||
|
|
||||||
[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/dynfam.html#a-conditional-disabled-variable-with-dynamic-identifier)
|
[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#a-conditional-hidden-family-with-jinja)
|
||||||
|
|
||||||
|
|
||||||
## 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_061
|
git switch --detach v1.1_070
|
||||||
```
|
```
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
@ -39,11 +39,11 @@ git switch --detach v1.1_061
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./">.</a><br/>
|
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./">.</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/">firefox</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/">firefox</a><br/>
|
||||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||||
<br/><br/></p>
|
<br/><br/></p>
|
||||||
|
|
||||||
Contents of the firefox/20-manual.yml file
|
Contents of the firefox/20-manual.yml file
|
||||||
|
|
@ -60,7 +60,10 @@ manual:
|
||||||
'{{ identifier }}_proxy':
|
'{{ identifier }}_proxy':
|
||||||
description: '{{ identifier }} Proxy'
|
description: '{{ identifier }} Proxy'
|
||||||
hidden:
|
hidden:
|
||||||
variable: _.use_for_https
|
jinja: |-
|
||||||
|
{% if _.use_for_https %}
|
||||||
|
HTTPS is same has HTTP
|
||||||
|
{% endif %}
|
||||||
dynamic:
|
dynamic:
|
||||||
- HTTPS
|
- HTTPS
|
||||||
- SOCKS
|
- SOCKS
|
||||||
|
|
@ -130,7 +133,7 @@ rougail -m firefox/ -o doc
|
||||||
> - manual.*https*_proxy
|
> - manual.*https*_proxy
|
||||||
> - manual.*socks*_proxy\
|
> - manual.*socks*_proxy\
|
||||||
> *`hidden`*\
|
> *`hidden`*\
|
||||||
> **Hidden**: when the variable "[Also use this proxy for HTTPS](#manual.use_for_https)" has the value "true"\
|
> **Hidden**: depends on a calculation\
|
||||||
> **Identifiers**:
|
> **Identifiers**:
|
||||||
> - HTTPS
|
> - HTTPS
|
||||||
> - SOCKS
|
> - SOCKS
|
||||||
|
|
@ -142,19 +145,6 @@ rougail -m firefox/ -o doc
|
||||||
| **<a id="manual.:::identifier:::_proxy.version" name="manual.:::identifier:::_proxy.version">manual.*https*_proxy.version</a>**<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" |
|
| **<a id="manual.:::identifier:::_proxy.version" name="manual.:::identifier:::_proxy.version">manual.*https*_proxy.version</a>**<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" |
|
||||||
|
|
||||||
|
|
||||||
***
|
|
||||||
### Let's generate the changelog
|
|
||||||
|
|
||||||
```shell
|
|
||||||
rougail -m firefox/ -o doc --doc.contents changelog
|
|
||||||
```
|
|
||||||
#### New variable
|
|
||||||
|
|
||||||
| Variable | Description |
|
|
||||||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
||||||
| **<a id="manual.:::identifier:::_proxy.version" name="manual.:::identifier:::_proxy.version">manual.*https*_proxy.version</a>**<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" |
|
|
||||||
|
|
||||||
|
|
||||||
***
|
***
|
||||||
## User datas
|
## User datas
|
||||||
|
|
||||||
|
|
@ -205,6 +195,24 @@ Variables:
|
||||||
- :notebook: version (SOCKS host version used by proxy): <span style="color: #B8860B">v5</span>
|
- :notebook: version (SOCKS host version used by proxy): <span style="color: #B8860B">v5</span>
|
||||||
|
|
||||||
***
|
***
|
||||||
|
#### Output for "manual.https_proxy"
|
||||||
|
|
||||||
|
```shell
|
||||||
|
rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.root manual.https_proxy
|
||||||
|
```
|
||||||
|
> [!NOTE]
|
||||||
|
>
|
||||||
|
> **Caption:**
|
||||||
|
> - Variable
|
||||||
|
> - <span style="color: #B8860B">Default value</span>
|
||||||
|
> - <span style="color: #006400">Modified value</span>
|
||||||
|
> - (:hourglass_flowing_sand: Original default value)
|
||||||
|
|
||||||
|
Variables:
|
||||||
|
- :notebook: address (HTTPS address): <span style="color: #006400">https.proxy.net</span> ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: https.proxy.net ← loaded from the YAML file "config/01/config.yml" :hourglass_flowing_sand: http.proxy.net)
|
||||||
|
- :notebook: port (HTTPS port): <span style="color: #B8860B">3128</span>
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
|
||||||
- [[tutorial v1.1_070] A conditional hidden family with Jinja](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_070~1..v1.1_070))
|
- [[tutorial v1.1_071] Jinja with a description](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_071/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_071~1..v1.1_071))
|
||||||
|
|
|
||||||
1
config/01/cmd_root.txt
Normal file
1
config/01/cmd_root.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
rougail -m firefox/ -u yaml -yf config/01/config.yml --cli.root manual.https_proxy
|
||||||
11
config/01/output_root.html
Normal file
11
config/01/output_root.html
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<pre>╭────────────── Caption ───────────────╮
|
||||||
|
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||||
|
│ <span style="color: #00aa00">Modified value</span> │
|
||||||
|
│ (⏳ Original default value) │
|
||||||
|
╰──────────────────────────────────────╯
|
||||||
|
Variables:
|
||||||
|
<span style="color: #5c5cff">┣━━ </span>📓 address (HTTPS address): <span style="color: #00aa00">https.proxy.net</span> ◀ loaded from the YAML file
|
||||||
|
<span style="color: #5c5cff">┃ </span>"config/01/config.yml" (⏳ https.proxy.net ◀ loaded from the YAML file
|
||||||
|
<span style="color: #5c5cff">┃ </span>"config/01/config.yml" ⏳ http.proxy.net)
|
||||||
|
<span style="color: #5c5cff">┗━━ </span>📓 port (HTTPS port): <span style="color: #ffd700">3128</span>
|
||||||
|
</pre>
|
||||||
1
config/01/root
Normal file
1
config/01/root
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
manual.https_proxy
|
||||||
10
tree.html
10
tree.html
|
|
@ -1,7 +1,7 @@
|
||||||
<p>
|
<p>
|
||||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./">.</a><br/>
|
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./">.</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/">firefox</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/">firefox</a><br/>
|
||||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||||
<br/><br/></p>
|
<br/><br/></p>
|
||||||
Loading…
Reference in a new issue