[tutorial v1.1_181] Calculate a random color (config and doc)
This commit is contained in:
parent
77c817d57a
commit
3f2ab33971
7 changed files with 99 additions and 40 deletions
84
README.md
84
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_170] A leadership family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_170/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_180~1..v1.1_180))
|
- [[tutorial v1.1_180] Regexp type](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_181~1..v1.1_181))
|
||||||
|
|
||||||
# [tutorial v1.1_180] Regexp type
|
# [tutorial v1.1_181] Calculate a random color
|
||||||
|
|
||||||
[Read the tutorial "Regexp type" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#regexp-type)
|
[Read the tutorial "Calculate a random color" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#calculate-a-random-color)
|
||||||
|
|
||||||
|
|
||||||
## Screenshot
|
## Screenshot
|
||||||
|
|
@ -25,27 +25,27 @@ 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_180
|
git switch --detach v1.1_181
|
||||||
```
|
```
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./">.</a><br/>
|
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./">.</a><br/>
|
||||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/">firefox</a><br/>
|
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/">firefox</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/30-auto.yml">30-auto.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/30-auto.yml">30-auto.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
|
||||||
│ └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/60-dns_over_https.yml">60-dns_over_https.yml</a><br/>
|
│ └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/60-dns_over_https.yml">60-dns_over_https.yml</a><br/>
|
||||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./foxyproxy/">foxyproxy</a><br/>
|
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./foxyproxy/">foxyproxy</a><br/>
|
||||||
│ └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./foxyproxy/00-foxyproxy.yml">00-foxyproxy.yml</a><br/>
|
│ └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./foxyproxy/00-foxyproxy.yml">00-foxyproxy.yml</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./types/">types</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./types/">types</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./types/proxy/">proxy</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./types/proxy/">proxy</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./types/proxy/00-type.yml">00-type.yml</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./types/proxy/00-type.yml">00-type.yml</a><br/>
|
||||||
<br/><br/></p>
|
<br/><br/></p>
|
||||||
|
|
||||||
Contents of the foxyproxy/00-foxyproxy.yml file
|
Contents of the foxyproxy/00-foxyproxy.yml file
|
||||||
|
|
@ -66,6 +66,10 @@ proxies:
|
||||||
color:
|
color:
|
||||||
description: Color
|
description: Color
|
||||||
regexp: ^#(?:[0-9a-f]{3}){1,2}$
|
regexp: ^#(?:[0-9a-f]{3}){1,2}$
|
||||||
|
default:
|
||||||
|
jinja: >-
|
||||||
|
#{%- for i in range(6) -%}{{- '0123456789abcdef' | random -}}{%- endfor -%}
|
||||||
|
description: random color value
|
||||||
...
|
...
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -130,7 +134,6 @@ Variables:
|
||||||
foxyproxy:
|
foxyproxy:
|
||||||
proxies:
|
proxies:
|
||||||
- title: My company
|
- title: My company
|
||||||
color: '#66cc66'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
@ -155,9 +158,46 @@ Variables:
|
||||||
- :open_file_folder: proxies (Proxy configuration)
|
- :open_file_folder: proxies (Proxy configuration)
|
||||||
- :open_file_folder: title (Title or Description)
|
- :open_file_folder: title (Title or Description)
|
||||||
- :notebook: title (Title or Description): <span style="color: #006400">My company</span> ← loaded from the YAML file "config/02/config.yml"
|
- :notebook: title (Title or Description): <span style="color: #006400">My company</span> ← loaded from the YAML file "config/02/config.yml"
|
||||||
- :notebook: color (Color): <span style="color: #006400">#66cc66</span> ← loaded from the YAML file "config/02/config.yml"
|
- :notebook: color (Color): <span style="color: #B8860B">#ddb31a</span>
|
||||||
|
|
||||||
|
***
|
||||||
|
### Example 3
|
||||||
|
|
||||||
|
#### config/03/config.yml
|
||||||
|
|
||||||
|
|
||||||
|
```yml
|
||||||
|
---
|
||||||
|
foxyproxy:
|
||||||
|
proxies:
|
||||||
|
- title: My company
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
#### Output
|
||||||
|
|
||||||
|
```shell
|
||||||
|
rougail -m firefox/ -s Firefox -xn FoxyProxy -xd 0 foxyproxy/ --types types/proxy --modes_level basic standard advanced -u yaml -yf config/03/config.yml
|
||||||
|
```
|
||||||
|
> [!NOTE]
|
||||||
|
>
|
||||||
|
> **Caption:**
|
||||||
|
> - Variable
|
||||||
|
> - <span style="color: #B8860B">Default value</span>
|
||||||
|
> - <span style="color: #006400">Modified value</span>
|
||||||
|
|
||||||
|
Variables:
|
||||||
|
- :open_file_folder: firefox (Firefox)
|
||||||
|
- :notebook: proxy_mode (Configure Proxy Access to the Internet): <span style="color: #B8860B">No proxy</span>
|
||||||
|
- :open_file_folder: dns_over_https (DNS over HTTPS)
|
||||||
|
- :notebook: enable_dns_over_https (Enable DNS over HTTPS): <span style="color: #B8860B">false</span>
|
||||||
|
- :open_file_folder: foxyproxy (FoxyProxy)
|
||||||
|
- :open_file_folder: proxies (Proxy configuration)
|
||||||
|
- :open_file_folder: title (Title or Description)
|
||||||
|
- :notebook: title (Title or Description): <span style="color: #006400">My company</span> ← loaded from the YAML file "config/03/config.yml"
|
||||||
|
- :notebook: color (Color): <span style="color: #B8860B">#980ee6</span>
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
|
||||||
- [[tutorial v1.1_181] Calculate a random color](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_181~1..v1.1_181))
|
- [[tutorial v1.1_182] Auto save value](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_182/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_182~1..v1.1_182))
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,3 @@
|
||||||
foxyproxy:
|
foxyproxy:
|
||||||
proxies:
|
proxies:
|
||||||
- title: My company
|
- title: My company
|
||||||
color: '#66cc66'
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,5 @@ Variables:
|
||||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 title (Title or Description)
|
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 title (Title or Description)
|
||||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 title (Title or Description): <span style="color: #00aa00">My company</span> ◀ loaded from the
|
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 title (Title or Description): <span style="color: #00aa00">My company</span> ◀ loaded from the
|
||||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┃ </span>YAML file "config/02/config.yml"
|
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┃ </span>YAML file "config/02/config.yml"
|
||||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 color (Color): <span style="color: #00aa00">#66cc66</span> ◀ loaded from the YAML file
|
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 color (Color): <span style="color: #ffd700">#2e3fa7</span>
|
||||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span>"config/02/config.yml"
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
||||||
1
config/03/cmd_ro.txt
Normal file
1
config/03/cmd_ro.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
rougail -m firefox/ -s Firefox -xn FoxyProxy -xd 0 foxyproxy/ --types types/proxy --modes_level basic standard advanced -u yaml -yf config/03/config.yml
|
||||||
4
config/03/config.yml
Normal file
4
config/03/config.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
foxyproxy:
|
||||||
|
proxies:
|
||||||
|
- title: My company
|
||||||
16
config/03/output_ro.html
Normal file
16
config/03/output_ro.html
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<pre>╭──────── Caption ────────╮
|
||||||
|
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||||
|
│ <span style="color: #00aa00">Modified value</span> │
|
||||||
|
╰─────────────────────────╯
|
||||||
|
Variables:
|
||||||
|
<span style="color: #5c5cff">┣━━ </span>📂 firefox (Firefox)
|
||||||
|
<span style="color: #5c5cff">┃ </span><span style="color: #5c5cff">┣━━ </span>📓 proxy_mode (Configure Proxy Access to the Internet): <span style="color: #ffd700">No proxy</span>
|
||||||
|
<span style="color: #5c5cff">┃ </span><span style="color: #5c5cff">┗━━ </span>📂 dns_over_https (DNS over HTTPS)
|
||||||
|
<span style="color: #5c5cff">┃ </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 enable_dns_over_https (Enable DNS over HTTPS): <span style="color: #ffd700">false</span>
|
||||||
|
<span style="color: #5c5cff">┗━━ </span>📂 foxyproxy (FoxyProxy)
|
||||||
|
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 proxies (Proxy configuration)
|
||||||
|
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📂 title (Title or Description)
|
||||||
|
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 title (Title or Description): <span style="color: #00aa00">My company</span> ◀ loaded from the
|
||||||
|
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┃ </span>YAML file "config/03/config.yml"
|
||||||
|
<span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 color (Color): <span style="color: #ffd700">#9aa2de</span>
|
||||||
|
</pre>
|
||||||
30
tree.html
30
tree.html
|
|
@ -1,17 +1,17 @@
|
||||||
<p>
|
<p>
|
||||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./">.</a><br/>
|
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./">.</a><br/>
|
||||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/">firefox</a><br/>
|
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/">firefox</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/30-auto.yml">30-auto.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/30-auto.yml">30-auto.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
|
||||||
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
|
│ ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
|
||||||
│ └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./firefox/60-dns_over_https.yml">60-dns_over_https.yml</a><br/>
|
│ └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./firefox/60-dns_over_https.yml">60-dns_over_https.yml</a><br/>
|
||||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./foxyproxy/">foxyproxy</a><br/>
|
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./foxyproxy/">foxyproxy</a><br/>
|
||||||
│ └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./foxyproxy/00-foxyproxy.yml">00-foxyproxy.yml</a><br/>
|
│ └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./foxyproxy/00-foxyproxy.yml">00-foxyproxy.yml</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./types/">types</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./types/">types</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./types/proxy/">proxy</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./types/proxy/">proxy</a><br/>
|
||||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_180/./types/proxy/00-type.yml">00-type.yml</a><br/>
|
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_181/./types/proxy/00-type.yml">00-type.yml</a><br/>
|
||||||
<br/><br/></p>
|
<br/><br/></p>
|
||||||
Loading…
Reference in a new issue