diff --git a/docs/tutorial/sequence.rst b/docs/tutorial/sequence.rst index eb2999afe..fee2faf3e 100644 --- a/docs/tutorial/sequence.rst +++ b/docs/tutorial/sequence.rst @@ -129,9 +129,83 @@ And the Rougail output is: ┗━━ πŸ““ color (Color): #66cc66 β—€ loaded from the YAML file "config/02/config.yml" +.. type-along:: A sequence with multiple user data + +We will now look at the same `proxies` sequence variable, +to which multiple values ​​are assigned: + +.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_190/config/03/config.yml + :language: yaml + :caption: A :file:`config/03/config.yml` user data file with multiple values + +.. + --- + foxyproxy: + proxies: + - title: My company + color: '#66cc66' + - title: An other company + color: '#cc66cc' + - title: WPAD + color: '#1166cc' + + +Which we could write in JSON like this: + + .. code-block:: json + + [ + { + "title": "My company", + "color": "#66cc66" + }, + { + "title": "An other company", + "color": "#cc66cc" + }, + { + "title": "WPAD", + "color": "#1166cc" + } + + ] + + +And now we can clearly see that this `proxies` variable of type `sequence` +is a container for lists of values ​​of the same shape, +and which contain the same number of elements: + +.. raw:: html + :class: output + :url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_190/config/03/output_ro.html + +.. + Variables: + ┣━━ πŸ“‚ firefox (Firefox) + ┃ ┣━━ πŸ““ proxy_mode (Configure Proxy Access to the Internet): No proxy + ┃ ┗━━ πŸ“‚ dns_over_https (DNS over HTTPS) + ┃ ┗━━ πŸ““ enable_dns_over_https (Enable DNS over HTTPS): false + ┗━━ πŸ“‚ foxyproxy (FoxyProxy) + ┗━━ πŸ“‚ proxies (Proxy configuration) + ┣━━ πŸ“‚ title (Title or Description) + ┃ ┣━━ πŸ““ title (Title or Description): My company β—€ loaded from the + ┃ ┃ YAML file "config/03/config.yml" + ┃ ┗━━ πŸ““ color (Color): #66cc66 β—€ loaded from the YAML file + ┃ "config/03/config.yml" + ┣━━ πŸ“‚ title (Title or Description) + ┃ ┣━━ πŸ““ title (Title or Description): An other company β—€ loaded from + ┃ ┃ the YAML file "config/03/config.yml" + ┃ ┗━━ πŸ““ color (Color): #cc66cc β—€ loaded from the YAML file + ┃ "config/03/config.yml" + ┗━━ πŸ“‚ title (Title or Description) + ┣━━ πŸ““ title (Title or Description): WPAD β—€ loaded from the YAML + ┃ file "config/03/config.yml" + ┗━━ πŸ““ color (Color): #1166cc β—€ loaded from the YAML file + "config/03/config.yml" + .. seealso:: - You can have a look at the Rougail format pages :ref:`Sequence of homogeneous elements ` + To go further, you can have a look at the Rougail format pages :ref:`Sequence of homogeneous elements ` .. keypoints:: let's review the key points