begin custom type

This commit is contained in:
gwen 2026-03-20 17:55:15 +01:00
parent cb425ed7f7
commit e840bc5289

View file

@ -16,7 +16,7 @@ Custom type
Of course, you can also decide to copy/paste or download the tutorial files contents while following the tutorial steps.
If you want to follow this tutorial with the help of the corresponding :tutorial:`rougail-tutorials git repository <src/branch/1.1>`,
this workshop page corresponds to the tags :tutorial:`v1.1_070 <src/tag/v1.1_080>` to :tutorial:`v1.1_072 <src/tag/v1.1_081>`
this workshop page corresponds to the tags :tutorial:`v1.1_080 <src/tag/v1.1_080>` to :tutorial:`v1.1_081 <src/tag/v1.1_081>`
in the repository.
::
@ -39,10 +39,83 @@ Our structural folder will be expanded a bit:
.. raw:: html
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_080/tree.html
Notice that we have now a :file:`types` folder with a :file:`proxy` subfolder.
This is where we will define our new type.
Notice that we have now a new :file:`types` folder in our tree structure.
This is where we will define our new types.
And we also have a new structure file named :file:`00-proxy.yml`.
Let's examine them more closely.
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_080/types/proxy/00_type.yml
:language: yaml
:caption: The :file:`types/proxy/00_type.yml` type structure file that defines our new `proxy` type.
..
%YAML 1.2
---
version: 1.1
proxy:
address:
description: Proxy address
type: domainname
params:
allow_ip: true
default:
variable: __.http_proxy.address
port:
description: Proxy port
type: port
default:
variable: __.http_proxy.port
...
TODO:
::
- la notion de type vient de la déclaration ligne de commande --type
rougail -m firefox/ --types types/proxy -u yaml -yf config/01/config.yml
- le fichier firefox/10-manual.yml a des changements
https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_080~1..v1.1_080
dégraissage dû à la déclaration de type
- la déclaration de type ne se voit pas
Variables:
┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/01/config.yml" (⏳ No proxy)
┗━━ 📂 Manual proxy configuration
┣━━ 📂 HTTP Proxy
┃ ┣━━ 📓 Proxy address: http.proxy.net ◀ loaded from the YAML file "config/01/config.yml"
┃ ┗━━ 📓 Proxy port: 3128 ◀ loaded from the YAML file "config/01/config.yml" (⏳ 8080)
┣━━ 📓 Also use this proxy for HTTPS: false ◀ loaded from the YAML file "config/01/config.yml" (⏳ true)
┣━━ 📂 HTTPS Proxy
┃ ┣━━ 📓 HTTPS address: https.proxy.net ◀ loaded from the YAML file "config/01/config.yml" (⏳ http.proxy.net)
┃ ┗━━ 📓 HTTPS port: 3128
┗━━ 📂 SOCKS Proxy
┣━━ 📓 SOCKS address: http.proxy.net
┣━━ 📓 SOCKS port: 3128
┗━━ 📓 SOCKS host version used by proxy: v5
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_080/types/proxy/00_type.yml
:language: yaml
:caption: The :file:`types/proxy/00_type.yml` structure file with proxy type declaration
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_080/firefox/10-manual.yml
:language: yaml
:caption: The :file:`firefox/10-manual.yml` structure file with less declaration due to the type definition
The Rougail CLI with the type declaration command line option:
.. raw:: html
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_080/config/01/cmd_ro.txt
:class: terminal
The output:
.. raw:: html
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_080/config/01/output_ro.html
:class: output