keypoints
This commit is contained in:
parent
d7b2e9b521
commit
fbc0744f61
3 changed files with 64 additions and 10 deletions
|
@ -54,6 +54,7 @@ xref_links.update(links)
|
||||||
" :source:`v1.1_010/firefox/00-proxy.yml` "
|
" :source:`v1.1_010/firefox/00-proxy.yml` "
|
||||||
extlinks = {'source': ('https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/%s',
|
extlinks = {'source': ('https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/%s',
|
||||||
'source: %s'),
|
'source: %s'),
|
||||||
|
'tiramisu': ('https://tiramisu.readthedocs.io/en/latest/%s', 'tiramisu: %s'),
|
||||||
}
|
}
|
||||||
#---- options for HTML output ----
|
#---- options for HTML output ----
|
||||||
default_role = "code"
|
default_role = "code"
|
||||||
|
|
|
@ -3,18 +3,21 @@ Tutorial with a real world sample
|
||||||
|
|
||||||
Here's a quite well supplied tutorial, we're gonna start with a use case that comes from the real world.
|
Here's a quite well supplied tutorial, we're gonna start with a use case that comes from the real world.
|
||||||
|
|
||||||
.. demo:: Configuring (the setting of) your favorite web browser
|
.. objectives:: Configuring (the setting of) your favorite web browser
|
||||||
|
|
||||||
This tutorial will show you an example of Rougail use based on the
|
This tutorial will show you an example of Rougail use based on the
|
||||||
"how to set a proxy" in the `Mozilla Firefox <https://www.mozilla.org/en-US/firefox/new/>`_ browser
|
"how to set a proxy" in the `Mozilla Firefox <https://www.mozilla.org/en-US/firefox/new/>`_ browser
|
||||||
use case.
|
use case.
|
||||||
|
|
||||||
More precisely, this tutorial aims at reproducing this Mozilla Firefox settings page:
|
More precisely, this tutorial aims at reproducing :term:`variable`\ s (that is, configuration options) behind this Mozilla Firefox settings page:
|
||||||
|
|
||||||
.. note:: We are not coding a firefox plugin here.
|
.. image:: images/firefox.png
|
||||||
|
|
||||||
|
.. attention:: We are not coding a firefox plugin here.
|
||||||
We are just going to handle some of the firefox configuration settings
|
We are just going to handle some of the firefox configuration settings
|
||||||
with Rougail.
|
with Rougail.
|
||||||
|
|
||||||
|
|
||||||
Presentation of the firefox configuration variables
|
Presentation of the firefox configuration variables
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,42 @@ Preliminaries
|
||||||
|
|
||||||
- define a variable with a description and a default value
|
- define a variable with a description and a default value
|
||||||
|
|
||||||
:ref:`Here is a Rougail variable with a description <RougailDictionaryFirstVariableDefault>`
|
:ref:`Here is a Rougail variable with a default value <RougailDictionaryFirstVariableDefault>`
|
||||||
|
|
||||||
|
Values are mandatory
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
If, like in this situation:
|
||||||
|
|
||||||
|
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_004/firefox/00-proxy.yml
|
||||||
|
:linenos:
|
||||||
|
:language: yaml
|
||||||
|
:caption: The :file:`config/01/config.yaml` rougail dictionnary file, with no default value set.
|
||||||
|
:name: RougailDictionaryNoDefaultUseCase
|
||||||
|
|
||||||
|
In this situation there are no default value set. The rougail CLI will output an error :
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
:caption: A rougail Command Line Utility call with the :file:`config/01/config.yaml` rougail dictionnary file
|
||||||
|
|
||||||
|
foo@bar:~$ rougail -v 1.1 -m firefox -u file -ff config/01/config.yaml
|
||||||
|
|
||||||
|
|
||||||
|
.. raw:: html
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
.. raw:: html
|
||||||
|
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_003/config/01/output_ro.html
|
||||||
|
|
||||||
|
.. raw:: html
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
Rougail waits for a value to be set, that's why.
|
||||||
|
|
||||||
|
|
||||||
|
.. seealso:: To go further, have a look at the :tiramisu:`mandatory option <glossary.html#term-mandatory-option>` Tiramisu's definition.
|
||||||
|
|
||||||
|
|
||||||
The integrator role
|
The integrator role
|
||||||
|
@ -73,10 +108,25 @@ The Rougail CLI can output a rather complete view of the dataset:
|
||||||
|
|
||||||
.. image:: images/UserDataOutput.png
|
.. image:: images/UserDataOutput.png
|
||||||
|
|
||||||
.. keypoints:: Progress keypoints
|
.. keypoints:: Key points progress
|
||||||
|
|
||||||
|
**Keywords**
|
||||||
|
|
||||||
|
- :term:`dictionary`: structure description file
|
||||||
|
- :term:`variable`: an option's name which has a value
|
||||||
|
- a variable's description
|
||||||
|
- a variable's default value
|
||||||
|
- the :term:`integrator` and :term:`operator` roles
|
||||||
|
- a mandatory option value
|
||||||
|
|
||||||
|
|
||||||
|
To sum up, we have arrived here
|
||||||
|
|
||||||
|
**Structure definition file**
|
||||||
|
|
||||||
|
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_005/firefox/00-proxy.yml
|
||||||
|
:linenos:
|
||||||
|
:language: yaml
|
||||||
|
:caption: A rougail dictionnary file with a variable named `proxy_mode`, with a default value.
|
||||||
|
:name: RougailDictionaryDefaultVariabletUseCase
|
||||||
|
|
||||||
- :term:`dictionary`: structure description file
|
|
||||||
- :term:`variable`: an option's name wich has a value
|
|
||||||
- a variable's description
|
|
||||||
- a variable's default value
|
|
||||||
- the :term:`integrator` and :term:`operator` role
|
|
||||||
|
|
Loading…
Reference in a new issue