Compare commits

...

3 commits

11706 changed files with 40442 additions and 33690 deletions

View file

@ -1,3 +1,20 @@
## 0.2.0a47 (2026-04-30)
### Feat
- add dot if needed
- better documentation generation
### Fix
- better identifier documentation
- better display of path
- better description informations
- do not display {{ identifier }} in description
- better identifier support
- support mode
- root config with identifier
## 0.2.0a46 (2026-01-29)
### Feat

View file

@ -78,5 +78,3 @@ include_toc: true
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|---------------------|---------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="doc.examples.comment" name="doc.examples.comment">doc.examples.comment</a>**<br/>**Ligne de commande** : <br/>&nbsp;-dx, --doc.examples.comment<br/>&nbsp;-ndx, --doc.examples.no-comment<br/>**Variable d'environnement** : DOC.EXAMPLES.COMMENT | Ajouter la description des variables et des familles lorsqu&#x27;on génère des exemples. | false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | |
| **<a id="doc.examples.comment_column" name="doc.examples.comment_column">doc.examples.comment_column</a>**<br/>**Ligne de commande** : <br/>--doc.examples.comment_column<br/>**Variable d'environnement** : DOC.EXAMPLES.COMMENT_COLUMN | Commentaire dans les exemples commence à la colonne. | 30 | [`integer`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | *`désactivé`*<br/>**Désactivé** : lorsque la variable "[ajouter la description des variables et des familles lorsqu'on génère des exemples](#doc.examples.comment)" a la valeur "false". |

View file

@ -78,5 +78,3 @@ include_toc: true
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|-----------------|-------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="doc.examples.comment" name="doc.examples.comment">doc.examples.comment</a>**<br/>**Command line**: <br/>&nbsp;-dx, --doc.examples.comment<br/>&nbsp;-ndx, --doc.examples.no-comment<br/>**Environment variable**: DOC.EXAMPLES.COMMENT | Add description of variables and families when generate examples. | false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | |
| **<a id="doc.examples.comment_column" name="doc.examples.comment_column">doc.examples.comment_column</a>**<br/>**Command line**: <br/>--doc.examples.comment_column<br/>**Environment variable**: DOC.EXAMPLES.COMMENT_COLUMN | Comment in examples starts at column. | 30 | [`integer`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *`disabled`*<br/>**Disabled**: when the variable "[add description of variables and families when generate examples](#doc.examples.comment)" has the value "false". |

View file

@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2026-03-31 12:21+0200\n"
"PO-Revision-Date: 2026-03-31 12:22+0200\n"
"POT-Creation-Date: 2026-04-30 06:54+0200\n"
"PO-Revision-Date: 2026-04-30 06:55+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.8\n"
"X-Generator: Poedit 3.9\n"
#: src/rougail/output_doc/changelog.py:153
msgid "New variable"
@ -24,23 +24,23 @@ msgstr "Nouvelle variable"
msgid "New variables"
msgstr "Nouvelles variables"
#: src/rougail/output_doc/changelog.py:169
#: src/rougail/output_doc/changelog.py:165
msgid "Modified variable"
msgstr "Variable modifiée"
#: src/rougail/output_doc/changelog.py:171
#: src/rougail/output_doc/changelog.py:167
msgid "Modified variables"
msgstr "Variables modifiées"
#: src/rougail/output_doc/changelog.py:185
#: src/rougail/output_doc/changelog.py:177
msgid "Deleted variable"
msgstr "Variable supprimée"
#: src/rougail/output_doc/changelog.py:187
#: src/rougail/output_doc/changelog.py:179
msgid "Deleted variables"
msgstr "Variables supprimées"
#: src/rougail/output_doc/collect.py:52
#: src/rougail/output_doc/collect.py:53
msgid ""
"cannot find \"{0}_calculation\" information, do you have annotate this "
"configuration?"
@ -48,140 +48,140 @@ msgstr ""
"ne peut trouver l'information \"{0}_calculation\", avez-vous annoté cette "
"configuration ?"
#: src/rougail/output_doc/collect.py:102
msgid "the value of the information \"{0}\" of the variable \"{1}\""
msgstr "la valeur de l'information \"{0}\" de la variable \"{1}\""
#: src/rougail/output_doc/collect.py:107
msgid "the value of the information \"{0}\" of the variable {{0}}"
msgstr "la valeur de l'information \"{0}\" de la variable \"{{0}}\""
#: src/rougail/output_doc/collect.py:106
#: src/rougail/output_doc/collect.py:115
msgid "the value of the global information \"{0}\""
msgstr "la valeur de l'information globale \"{0}\""
#: src/rougail/output_doc/collect.py:112
#: src/rougail/output_doc/collect.py:121
msgid "the value of the {0}"
msgstr "la valeur de l'{0}"
#: src/rougail/output_doc/collect.py:121
#: src/rougail/output_doc/collect.py:130
msgid "depends on a calculation"
msgstr "dépend d'un calcul"
#: src/rougail/output_doc/collect.py:122
#: src/rougail/output_doc/collect.py:131
msgid "\"{0}\" is a calculation for {1} but has no description in {2}"
msgstr "\"{0}\" est un calcul pour {1} mais n'a pas de description dans {2}"
#: src/rougail/output_doc/collect.py:181
#: src/rougail/output_doc/collect.py:190
msgid "depends on an undocumented variable"
msgstr "dépends d'une variable non documentée"
#: src/rougail/output_doc/collect.py:199
#: src/rougail/output_doc/collect.py:208
msgid "is \"{0}\""
msgstr "est \"{0}\""
#: src/rougail/output_doc/collect.py:204
#: src/rougail/output_doc/collect.py:213
msgid "is accessible"
msgstr "est accessible"
#: src/rougail/output_doc/collect.py:206
#: src/rougail/output_doc/collect.py:215
msgid "is defined"
msgstr "est définie"
#: src/rougail/output_doc/collect.py:211
#: src/rougail/output_doc/collect.py:220
msgid "hasn't the value \"{0}\""
msgstr "n'a pas la valeur \"{0}\""
#: src/rougail/output_doc/collect.py:213
#: src/rougail/output_doc/collect.py:222
msgid "has the value \"{0}\""
msgstr "a la valeur \"{0}\""
#: src/rougail/output_doc/collect.py:217
#: src/rougail/output_doc/collect.py:226
msgid "is {0}"
msgstr "est {0}"
#: src/rougail/output_doc/collect.py:219
msgid "when the variable \"{{0}}\" {0}."
msgstr "lorsque la variable \"{{0}}\" {0}."
#: src/rougail/output_doc/collect.py:228
msgid "when the variable {{0}} {0}."
msgstr "lorsque la variable {{0}} {0}."
#: src/rougail/output_doc/collect.py:246
msgid "the value of the variable \"{0}\" if it is defined"
msgstr "la valeur de la variable \"{0}\" si elle est définie"
#: src/rougail/output_doc/collect.py:256
msgid "the value of the variable {0} if it is defined"
msgstr "la valeur de la variable {0} si elle est définie"
#: src/rougail/output_doc/collect.py:248
msgid "the value of the variable \"{0}\""
msgstr "la valeur de la variable \"{0}\""
#: src/rougail/output_doc/collect.py:258
msgid "the value of the variable {0}"
msgstr "la valeur de la variable {0}"
#: src/rougail/output_doc/collect.py:264
#: src/rougail/output_doc/collect.py:277
msgid "(from an undocumented variable)"
msgstr "(issue d'une variable non documentée)"
#: src/rougail/output_doc/collect.py:270
#: src/rougail/output_doc/collect.py:283
msgid "{0} (from an undocumented variable)"
msgstr "{0} (issue d'une variable non documentée)"
#: src/rougail/output_doc/collect.py:274
#: src/rougail/output_doc/collect.py:287
msgid "the value of an undocumented variable"
msgstr "la valeur d'une variable non documentée"
#: src/rougail/output_doc/collect.py:309
#: src/rougail/output_doc/collect.py:322
msgid "when the identifier is \"{0}\""
msgstr "lorsque l'identifiant est \"{0}\""
#: src/rougail/output_doc/collect.py:311
#: src/rougail/output_doc/collect.py:324
msgid "when the identifier is not \"{0}\""
msgstr "lorsque l'identifiant n'est pas \"{0}\""
#: src/rougail/output_doc/collect.py:316
#: src/rougail/output_doc/collect.py:329
msgid "the value of the identifier"
msgstr "la valeur de l'identifiant"
#: src/rougail/output_doc/collect.py:401
#: src/rougail/output_doc/collect.py:426
msgid "This family contains lists of variable blocks"
msgstr "Cette famille contient des listes de bloc de variable"
#: src/rougail/output_doc/collect.py:405
#: src/rougail/output_doc/collect.py:430
msgid "This family builds families dynamically"
msgstr "Cette famille construit des familles dynamiquement"
#: src/rougail/output_doc/collect.py:415
#: src/rougail/output_doc/collect.py:440
msgid "This family is a namespace"
msgstr "Cette famille est un espace de nom"
#: src/rougail/output_doc/collect.py:466
#: src/rougail/output_doc/collect.py:489
msgid "Example"
msgstr "Exemple"
#: src/rougail/output_doc/collect.py:469
#: src/rougail/output_doc/collect.py:492
msgid "Examples"
msgstr "Exemples"
#: src/rougail/output_doc/collect.py:475
#: src/rougail/output_doc/collect.py:498
msgid "Tag"
msgstr "Étiquette"
#: src/rougail/output_doc/collect.py:478
#: src/rougail/output_doc/collect.py:501
msgid "Tags"
msgstr "Étiquettes"
#: src/rougail/output_doc/collect.py:572
#: src/rougail/output_doc/collect.py:597
msgid "text based with regular expressions \"{0}\""
msgstr "texte avec expression rationnelle \"{0}\""
#: src/rougail/output_doc/collect.py:576
#: src/rougail/output_doc/collect.py:601
#: src/rougail/output_doc/tabular/six_columns.py:83
msgid "Validator"
msgstr "Validateur"
#: src/rougail/output_doc/collect.py:579
#: src/rougail/output_doc/collect.py:604
msgid "Validators"
msgstr "Validateurs"
#: src/rougail/output_doc/collect.py:588
#: src/rougail/output_doc/collect.py:613
msgid "Choices"
msgstr "Choix"
#: src/rougail/output_doc/collect.py:638
#: src/rougail/output_doc/collect.py:665
msgid "Default"
msgstr "Défaut"
#: src/rougail/output_doc/collect.py:648
#: src/rougail/output_doc/collect.py:675
msgid "No attribute \"description\" for \"{0}\" in {1}"
msgstr "Aucun attribut \"description\" pour \"{0}\" dans {1}"
@ -386,20 +386,24 @@ msgstr "Commentaire dans les exemples commence à la colonne"
msgid "{0} is not set as step.output"
msgstr "{0} n'est pas défini dans step.output"
#: src/rougail/output_doc/example.py:96
#: src/rougail/output_doc/example.py:61
msgid "Example with mandatory variables not filled in"
msgstr "Exemple avec des variables obligatoire non renseignée"
#: src/rougail/output_doc/example.py:98
#: src/rougail/output_doc/example.py:63
msgid "Example with all variables modifiable"
msgstr "Exemple avec toutes les variables modifiable"
#: src/rougail/output_doc/output/asciidoc.py:156
#: src/rougail/output_doc/output/console.py:201
#: src/rougail/output_doc/output/gitlab.py:44
#: src/rougail/output_doc/output/console.py:234
#: src/rougail/output_doc/output/gitlab.py:53
msgid "Informations"
msgstr "Informations"
#: src/rougail/output_doc/output/console.py:75
msgid "cannot find Python module Rich, please install it!"
msgstr "ne peut trouver le module Python Rich, veuillez l'installer !"
#: src/rougail/output_doc/tabular/five_columns.py:72
msgid "Access control"
msgstr "Contrôle des accès"
@ -428,21 +432,21 @@ msgstr "Ligne de commande"
msgid "Environment variable"
msgstr "Variable d'environnement"
#: src/rougail/output_doc/utils.py:532
#: src/rougail/output_doc/utils.py:545
msgid "Path"
msgstr "Chemin"
#: src/rougail/output_doc/utils.py:542
#: src/rougail/output_doc/utils.py:555
msgid "Identifiers"
msgstr "Identifiants"
#: src/rougail/output_doc/utils.py:825 src/rougail/output_doc/utils.py:834
#: src/rougail/output_doc/utils.py:840 src/rougail/output_doc/utils.py:846
#: src/rougail/output_doc/utils.py:850
#: src/rougail/output_doc/utils.py:849 src/rougail/output_doc/utils.py:858
#: src/rougail/output_doc/utils.py:864 src/rougail/output_doc/utils.py:870
#: src/rougail/output_doc/utils.py:874
msgid "(default)"
msgstr "(défaut)"
#: src/rougail/output_doc/utils.py:1164
#: src/rougail/output_doc/utils.py:1211
msgid "{0}: {1}"
msgstr "{0} : {1}"

View file

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2026-03-31 12:22+0200\n"
"POT-Creation-Date: 2026-04-30 06:55+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -23,160 +23,160 @@ msgstr ""
msgid "New variables"
msgstr ""
#: src/rougail/output_doc/changelog.py:169
#: src/rougail/output_doc/changelog.py:165
msgid "Modified variable"
msgstr ""
#: src/rougail/output_doc/changelog.py:171
#: src/rougail/output_doc/changelog.py:167
msgid "Modified variables"
msgstr ""
#: src/rougail/output_doc/changelog.py:185
#: src/rougail/output_doc/changelog.py:177
msgid "Deleted variable"
msgstr ""
#: src/rougail/output_doc/changelog.py:187
#: src/rougail/output_doc/changelog.py:179
msgid "Deleted variables"
msgstr ""
#: src/rougail/output_doc/collect.py:52
#: src/rougail/output_doc/collect.py:53
msgid "cannot find \"{0}_calculation\" information, do you have annotate this configuration?"
msgstr ""
#: src/rougail/output_doc/collect.py:102
msgid "the value of the information \"{0}\" of the variable \"{1}\""
#: src/rougail/output_doc/collect.py:107
msgid "the value of the information \"{0}\" of the variable {{0}}"
msgstr ""
#: src/rougail/output_doc/collect.py:106
#: src/rougail/output_doc/collect.py:115
msgid "the value of the global information \"{0}\""
msgstr ""
#: src/rougail/output_doc/collect.py:112
#: src/rougail/output_doc/collect.py:121
msgid "the value of the {0}"
msgstr ""
#: src/rougail/output_doc/collect.py:121
#: src/rougail/output_doc/collect.py:130
msgid "depends on a calculation"
msgstr ""
#: src/rougail/output_doc/collect.py:122
#: src/rougail/output_doc/collect.py:131
msgid "\"{0}\" is a calculation for {1} but has no description in {2}"
msgstr ""
#: src/rougail/output_doc/collect.py:181
#: src/rougail/output_doc/collect.py:190
msgid "depends on an undocumented variable"
msgstr ""
#: src/rougail/output_doc/collect.py:199
#: src/rougail/output_doc/collect.py:208
msgid "is \"{0}\""
msgstr ""
#: src/rougail/output_doc/collect.py:204
#: src/rougail/output_doc/collect.py:213
msgid "is accessible"
msgstr ""
#: src/rougail/output_doc/collect.py:206
#: src/rougail/output_doc/collect.py:215
msgid "is defined"
msgstr ""
#: src/rougail/output_doc/collect.py:211
#: src/rougail/output_doc/collect.py:220
msgid "hasn't the value \"{0}\""
msgstr ""
#: src/rougail/output_doc/collect.py:213
#: src/rougail/output_doc/collect.py:222
msgid "has the value \"{0}\""
msgstr ""
#: src/rougail/output_doc/collect.py:217
#: src/rougail/output_doc/collect.py:226
msgid "is {0}"
msgstr ""
#: src/rougail/output_doc/collect.py:219
msgid "when the variable \"{{0}}\" {0}."
#: src/rougail/output_doc/collect.py:228
msgid "when the variable {{0}} {0}."
msgstr ""
#: src/rougail/output_doc/collect.py:246
msgid "the value of the variable \"{0}\" if it is defined"
#: src/rougail/output_doc/collect.py:256
msgid "the value of the variable {0} if it is defined"
msgstr ""
#: src/rougail/output_doc/collect.py:248
msgid "the value of the variable \"{0}\""
#: src/rougail/output_doc/collect.py:258
msgid "the value of the variable {0}"
msgstr ""
#: src/rougail/output_doc/collect.py:264
#: src/rougail/output_doc/collect.py:277
msgid "(from an undocumented variable)"
msgstr ""
#: src/rougail/output_doc/collect.py:270
#: src/rougail/output_doc/collect.py:283
msgid "{0} (from an undocumented variable)"
msgstr ""
#: src/rougail/output_doc/collect.py:274
#: src/rougail/output_doc/collect.py:287
msgid "the value of an undocumented variable"
msgstr ""
#: src/rougail/output_doc/collect.py:309
#: src/rougail/output_doc/collect.py:322
msgid "when the identifier is \"{0}\""
msgstr ""
#: src/rougail/output_doc/collect.py:311
#: src/rougail/output_doc/collect.py:324
msgid "when the identifier is not \"{0}\""
msgstr ""
#: src/rougail/output_doc/collect.py:316
#: src/rougail/output_doc/collect.py:329
msgid "the value of the identifier"
msgstr ""
#: src/rougail/output_doc/collect.py:401
#: src/rougail/output_doc/collect.py:426
msgid "This family contains lists of variable blocks"
msgstr ""
#: src/rougail/output_doc/collect.py:405
#: src/rougail/output_doc/collect.py:430
msgid "This family builds families dynamically"
msgstr ""
#: src/rougail/output_doc/collect.py:415
#: src/rougail/output_doc/collect.py:440
msgid "This family is a namespace"
msgstr ""
#: src/rougail/output_doc/collect.py:466
#: src/rougail/output_doc/collect.py:489
msgid "Example"
msgstr ""
#: src/rougail/output_doc/collect.py:469
#: src/rougail/output_doc/collect.py:492
msgid "Examples"
msgstr ""
#: src/rougail/output_doc/collect.py:475
#: src/rougail/output_doc/collect.py:498
msgid "Tag"
msgstr ""
#: src/rougail/output_doc/collect.py:478
#: src/rougail/output_doc/collect.py:501
msgid "Tags"
msgstr ""
#: src/rougail/output_doc/collect.py:572
#: src/rougail/output_doc/collect.py:597
msgid "text based with regular expressions \"{0}\""
msgstr ""
#: src/rougail/output_doc/collect.py:576
#: src/rougail/output_doc/collect.py:601
#: src/rougail/output_doc/tabular/six_columns.py:83
msgid "Validator"
msgstr ""
#: src/rougail/output_doc/collect.py:579
#: src/rougail/output_doc/collect.py:604
msgid "Validators"
msgstr ""
#: src/rougail/output_doc/collect.py:588
#: src/rougail/output_doc/collect.py:613
msgid "Choices"
msgstr ""
#: src/rougail/output_doc/collect.py:638
#: src/rougail/output_doc/collect.py:665
msgid "Default"
msgstr ""
#: src/rougail/output_doc/collect.py:648
#: src/rougail/output_doc/collect.py:675
msgid "No attribute \"description\" for \"{0}\" in {1}"
msgstr ""
@ -336,20 +336,24 @@ msgstr ""
msgid "{0} is not set as step.output"
msgstr ""
#: src/rougail/output_doc/example.py:96
#: src/rougail/output_doc/example.py:61
msgid "Example with mandatory variables not filled in"
msgstr ""
#: src/rougail/output_doc/example.py:98
#: src/rougail/output_doc/example.py:63
msgid "Example with all variables modifiable"
msgstr ""
#: src/rougail/output_doc/output/asciidoc.py:156
#: src/rougail/output_doc/output/console.py:201
#: src/rougail/output_doc/output/gitlab.py:44
#: src/rougail/output_doc/output/console.py:234
#: src/rougail/output_doc/output/gitlab.py:53
msgid "Informations"
msgstr ""
#: src/rougail/output_doc/output/console.py:75
msgid "cannot find Python module Rich, please install it!"
msgstr ""
#: src/rougail/output_doc/tabular/five_columns.py:72
msgid "Access control"
msgstr ""
@ -378,21 +382,21 @@ msgstr ""
msgid "Environment variable"
msgstr ""
#: src/rougail/output_doc/utils.py:532
#: src/rougail/output_doc/utils.py:545
msgid "Path"
msgstr ""
#: src/rougail/output_doc/utils.py:542
#: src/rougail/output_doc/utils.py:555
msgid "Identifiers"
msgstr ""
#: src/rougail/output_doc/utils.py:825 src/rougail/output_doc/utils.py:834
#: src/rougail/output_doc/utils.py:840 src/rougail/output_doc/utils.py:846
#: src/rougail/output_doc/utils.py:850
#: src/rougail/output_doc/utils.py:849 src/rougail/output_doc/utils.py:858
#: src/rougail/output_doc/utils.py:864 src/rougail/output_doc/utils.py:870
#: src/rougail/output_doc/utils.py:874
msgid "(default)"
msgstr ""
#: src/rougail/output_doc/utils.py:1164
#: src/rougail/output_doc/utils.py:1211
msgid "{0}: {1}"
msgstr ""

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "rougail.output_doc"
version = "0.2.0a46"
version = "0.2.0a47"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "Rougail output doc"

View file

@ -1 +1 @@
__version__ = "0.2.0a46"
__version__ = "0.2.0a47"

View file

@ -249,9 +249,9 @@ class Annotator(Walk):
if not self.regexp_description_get_paths:
self.regexp_description_get_paths = compile('"(.*?)"')
index = 0
description = values.description
val_description = values.description
variables = []
for r_path in self.regexp_description_get_paths.findall(description):
for r_path in self.regexp_description_get_paths.findall(val_description):
variable, identifiers = self.objectspace.paths.get_with_dynamic(
r_path,
path,
@ -260,64 +260,65 @@ class Annotator(Walk):
values.xmlfiles,
)
if variable:
description = description.replace(f'"{r_path}"', f'"{{{index}}}"')
val_description = val_description.replace(f'"{r_path}"', f'{{{index}}}')
v = {"path": variable.path, "description": variable.description}
if identifiers:
v["identifiers"] = identifiers
v["identifiers"] = [identifiers]
v["identifier_type"] = "many"
variables.append(v)
index += 1
ret = {"description": description}
description = {"description": True,
"value": val_description,
}
if variables:
ret["variables"] = variables
return ret
description["variables"] = variables
else:
description = {}
if isinstance(values, JinjaCalculation):
if values.description:
value = values.description
else:
value = True
return {
"type": "jinja",
"value": value,
}
if not description:
description["value"] = True
description["type"] = "jinja"
return description
if isinstance(values, (VariableCalculation, VariablePropertyCalculation)):
variable_path = self.get_path_from_variable(values, version, path)
value = self.calculation_to_information_variable(
variable_path, values, prop, version, path
)
if value is None:
return
return {
"type": "variable",
"value": value,
"ori_path": variable_path,
"optional": values.optional,
"propertyerror": values.propertyerror,
}
if not description:
value = self.calculation_to_information_variable(
variable_path, values, prop, version, path
)
if value is None:
return
description["value"] = value
description["type"] = "variable"
description["ori_path"] = variable_path
description["optional"] = values.optional
description["propertyerror"] = values.propertyerror
return description
if isinstance(values, InformationCalculation):
# FIXME
return self.calculation_to_information_information(values, version, path)
if isinstance(values, IdentifierPropertyCalculation):
ret = {}
self.when_to_condition(values, ret)
ret["type"] = "identifier"
return ret
self.when_to_condition(values, description)
description["type"] = "identifier"
return description
if isinstance(values, IdentifierCalculation):
return {"type": "identifier"}
description["type"] = "identifier"
return description
if isinstance(values, IndexCalculation):
return {
"type": "index",
"value": True,
}
if not description:
description["value"] = True
description["type"] = "index"
return description
if isinstance(values, NamespaceCalculation):
return {
"type": "namespace",
"value": True,
}
if not description:
description["value"] = True
description["type"] = "namespace"
return description
if RisottoCalculation and isinstance(values, RisottoCalculation):
# FIXME
return {
"type": "risotto",
"value": True,
}
if not description:
description["value"] = True
description["type"] = "risotto"
return description
raise Exception(f'unknown calculation {type(values)} "{values}"')
def calculation_to_information_variable(
@ -337,6 +338,7 @@ class Annotator(Walk):
values_calculation = {"path": variable.path}
if identifiers:
values_calculation["identifiers"] = identifiers
values_calculation["identifier_type"] = "many"
if prop in PROPERTY_ATTRIBUTE:
# get comparative value
self.when_to_condition(values, values_calculation)

View file

@ -147,7 +147,7 @@ class Changelog: # pylint: disable=no-member,too-few-public-methods
self._modified_variables.append((new, modified_attributes))
def display(self) -> str:
msg = ""
lst = []
if self._added_variables:
if len(self._added_variables) == 1:
title = _("New variable")
@ -155,15 +155,11 @@ class Changelog: # pylint: disable=no-member,too-few-public-methods
title = _("New variables")
for add in self._added_variables:
self.formatter.variable_to_string(add)
msg += self.formatter._run(
[
self.formatter.title(title, self.level),
self.formatter.tabular(),
self.formatter.end_family(self.level),
],
self.level,
dico_is_already_treated=True,
)
lst.append(self.formatter.title(title, self.level))
lst.append(self.formatter.tabular())
end = self.formatter.end_family(self.level)
if end:
lst.append(end)
if self._modified_variables:
if len(self._modified_variables) == 1:
title = _("Modified variable")
@ -171,27 +167,25 @@ class Changelog: # pylint: disable=no-member,too-few-public-methods
title = _("Modified variables")
for mod, modified_attributes in self._modified_variables:
self.formatter.variable_to_string(mod, modified_attributes)
msg += self.formatter._run(
[
self.formatter.title(title, self.level),
self.formatter.tabular(),
self.formatter.end_family(self.level),
],
self.level,
dico_is_already_treated=True,
)
lst.append(self.formatter.title(title, self.level))
lst.append(self.formatter.tabular())
end = self.formatter.end_family(self.level)
if end:
lst.append(end)
if self._removed_variables:
if len(self._removed_variables) == 1:
title = _("Deleted variable")
else:
title = _("Deleted variables")
msg += self.formatter._run(
[
self.formatter.title(title, self.level),
self.formatter.list(self._removed_variables, inside_tabular=False),
self.formatter.end_family(self.level),
],
self.level,
dico_is_already_treated=True,
)
return msg
lst.append(self.formatter.title(title, self.level))
lst.append(self.formatter.list(self._removed_variables, inside_tabular=False))
end = self.formatter.end_family(self.level)
if end:
lst.append(end)
if not lst:
return ""
return self.formatter._run(
lst,
self.level,
dico_is_already_treated=True,
)

View file

@ -21,11 +21,12 @@ from typing import Optional
from tiramisu import Calculation, groups
from tiramisu.error import display_list, PropertiesOptionError
from tiramisu.config import get_common_path
from rougail.tiramisu import display_xmlfiles
from rougail.utils import PROPERTY_ATTRIBUTE
from rougail.error import VariableCalculationDependencyError, RougailWarning, ExtensionError
from .utils import dump, to_phrase, calc_path, add_dot
from .utils import dump, to_phrase, calc_path, add_dot, doc_path
from .i18n import _
@ -67,13 +68,15 @@ class _ToString:
return ret
def _calculation_to_string(self, child, calculation, attribute_type, inside_list=True):
if "description" in calculation:
values = calculation
if calculation.get("description", False):
values = calculation.copy()
if self.document_a_type and "variables" in values:
for variable in list(values["variables"]):
variable["path"] = self.doc_path(variable["path"])
variable["path"] = doc_path(variable["path"], self.document_a_type)
if not inside_list:
values["description"] = add_dot(values["description"])
values["description"] = add_dot(values.pop("value"))
else:
values["description"] = values.pop("value")
elif "type" not in calculation:
values = calculation["value"]
if isinstance(values, str) and not inside_list:
@ -88,8 +91,11 @@ class _ToString:
values = self._calculation_variable_to_string(
child, calculation, attribute_type
)
if isinstance(values, str) and not inside_list:
values = add_dot(values)
if not inside_list:
if isinstance(values, str):
values = add_dot(values)
elif isinstance(values, dict) and "message" in values:
values["message"] = add_dot(values["message"])
elif calculation["type"] == "identifier":
values = self._calculation_identifier_to_string(
child, calculation, attribute_type
@ -98,16 +104,19 @@ class _ToString:
values = add_dot(values)
elif calculation["type"] == "information":
if "path" in calculation:
variable_path = self.doc_path(calculation["path"])
values = _(
'the value of the information "{0}" of the variable "{1}"'
).format(calculation["information"], variable_path)
msg = _(
'the value of the information "{0}" of the variable {{0}}'
).format(calculation["information"])
if not inside_list:
msg = add_dot(msg)
variable = self.true_config.unrestraint.option(calculation["path"])
values = self._calculation_with_variable(child, variable, calculation, msg)
else:
values = _('the value of the global information "{0}"').format(
calculation["information"]
)
if not inside_list:
values = add_dot(values)
if not inside_list:
values = add_dot(values)
else:
values = _("the value of the {0}").format(calculation["type"])
if not inside_list:
@ -123,7 +132,7 @@ class _ToString:
'"{0}" is a calculation for {1} but has no description in {2}'
).format(
attribute_type,
self.doc_path(child.path(uncalculated=True)),
doc_path(child.path(uncalculated=True), self.document_a_type),
display_xmlfiles(child.information.get("ymlfiles")),
)
warn(
@ -134,19 +143,19 @@ class _ToString:
def _calculation_variable_to_string(self, child, calculation, attribute_type):
if attribute_type in PROPERTY_ATTRIBUTE:
func = self._calculation_variable_to_string_known_property
func = self._calculation_variable_to_string_property
else:
func = self._calculation_variable_to_string_not_properties
func = self._calculation_variable_to_string_not_property
return func(child, calculation, attribute_type)
def _calculation_variable_to_string_known_property(self, child, informations, prop):
def _calculation_variable_to_string_property(self, child, informations, prop):
condition = informations["value"]
variable_path = condition["path"]
values = []
option = self.true_config.option(variable_path)
if option.isdynamic():
variables = self._get_annotation_variable(
option, condition.get("identifiers")
child, option, condition.get("identifiers")
)
else:
option = self.true_config.option(variable_path)
@ -157,11 +166,11 @@ class _ToString:
raise err from err
is_inaccessible = True
if is_inaccessible:
variables = [[None, None, None]]
variables = [[None, None, None, None]]
else:
description = option.description(uncalculated=True)
variables = [[variable_path, description, None]]
for cpath, description, identifiers in variables:
variables = [[variable_path, description, None, "one"]]
for cpath, description, identifiers, identifier_type in variables:
if not cpath:
# we cannot access to this variable, so try with permissive
if condition["type"] == "transitive":
@ -184,7 +193,7 @@ class _ToString:
return informations.get("default", False)
if condition["type"] == "transitive":
return True
if prop in HIDDEN_PROPERTIES:
if prop in HIDDEN_PROPERTIES and not self.only_disabled:
condition_type = condition["condition"]
if (
condition_type == "when"
@ -216,12 +225,13 @@ class _ToString:
submsg = display_list(
[_("is {0}").format(prop), submsg], separator="or", sort=False
)
msg = _('when the variable "{{0}}" {0}.').format(submsg)
msg = _('when the variable {{0}} {0}.').format(submsg)
path_obj = {
"path": self.doc_path(variable_path),
"path": doc_path(variable_path, self.document_a_type),
}
if identifiers:
path_obj["identifiers"] = identifiers
path_obj["identifier_type"] = identifier_type
values.append(
{
@ -234,7 +244,7 @@ class _ToString:
return values[0]
return values
def _calculation_variable_to_string_not_properties(
def _calculation_variable_to_string_not_property(
self, child, calculation, attribute_type
):
variable = self.true_config.unrestraint.option(calculation["value"]["path"])
@ -243,21 +253,24 @@ class _ToString:
variable.get()
except AttributeError:
return None
true_msg = _('the value of the variable "{0}" if it is defined')
true_msg = _('the value of the variable {0} if it is defined')
else:
true_msg = _('the value of the variable "{0}"')
if not variable.isdynamic():
func = self._calculation_normal_variable_to_string_not_properties
else:
func = self._calculation_dynamic_variable_to_string_not_properties
return func(variable, calculation["value"], true_msg)
true_msg = _('the value of the variable {0}')
return self._calculation_with_variable(child, variable, calculation["value"], true_msg)
def _calculation_normal_variable_to_string_not_properties(
self, child, obj, true_msg
def _calculation_with_variable(self, child, variable, calculation, msg):
if not variable.isdynamic():
func = self._calculation_normal_with_variable
else:
func = self._calculation_dynamic_variable_with_variable
return func(child, variable, calculation, msg)
def _calculation_normal_with_variable(
self, child, variable, obj, msg
):
isfollower = child.isfollower()
if not isfollower and self.is_inaccessible_user_data(child):
uncalculated = child.value.default(uncalculated=True)
isfollower = not variable.isoptiondescription() and variable.isfollower()
if not isfollower and self.is_inaccessible_user_data(variable):
uncalculated = variable.value.default(uncalculated=True)
if uncalculated and not isinstance(uncalculated, Calculation):
if isinstance(uncalculated, list):
return {
@ -267,38 +280,38 @@ class _ToString:
else:
if not isinstance(uncalculated, str):
uncalculated = dump(uncalculated)
true_msg = _("{0} (from an undocumented variable)").format(
msg = _("{0} (from an undocumented variable)").format(
uncalculated
)
else:
true_msg = _("the value of an undocumented variable")
msg = _("the value of an undocumented variable")
try:
description = child.description(uncalculated=True)
description = variable.description(uncalculated=True)
except AttributeError:
description = path
return {
"message": true_msg,
"message": msg,
"path": obj,
"description": description,
}
def _calculation_dynamic_variable_to_string_not_properties(
self, child, obj, true_msg
def _calculation_dynamic_variable_with_variable(
self, child, variable, obj, msg
):
values = []
for path, description, identifiers in self._get_annotation_variable(
child, obj.get("identifiers")
for path, description, identifiers, identifier_type in self._get_annotation_variable(
child, variable, obj.get("identifiers")
):
cpath = calc_path(path, identifiers=identifiers)
variable = self.true_config.option(cpath)
variable = self.true_config.option(path)
path_obj = {
"path": self.doc_path(path),
"path": doc_path(path, self.document_a_type),
}
if identifiers:
path_obj["identifiers"] = identifiers
path_obj["identifier_type"] = identifier_type
values.append(
self._calculation_normal_variable_to_string_not_properties(
variable, path_obj, true_msg
self._calculation_normal_with_variable(
child, variable, path_obj, msg
)
)
return values
@ -315,15 +328,23 @@ class _ToString:
else:
return _("the value of the identifier")
def doc_path(self, path):
if self.document_a_type:
if not "." in path:
return None
return path.split(".", 1)[-1]
return path
def _get_annotation_variable(self, child, ori_identifiers):
path = child.path(uncalculated=True)
def _get_annotation_variable(self, child, variable, ori_identifiers):
path = variable.path(uncalculated=True)
description = variable.description(uncalculated=True)
child_path = child.path(uncalculated=True)
if ori_identifiers:
if path.count("{{ identifier }}") == len(ori_identifiers):
identifier_type = "one"
elif "{{ identifier }}" in path[len(get_common_path(child_path, path)):]:
identifier_type = "outside"
else:
identifier_type = "inside"
else:
common_path = get_common_path(child_path, path)
if common_path and "{{ identifier }}" in path[len(common_path):]:
identifier_type = "outside"
else:
identifier_type = "inside"
if ori_identifiers:
if None in ori_identifiers:
all_identifiers = self.true_config.option(
@ -331,18 +352,22 @@ class _ToString:
).identifiers()
else:
all_identifiers = [ori_identifiers]
for identifiers in all_identifiers:
cpath = calc_path(path, identifiers=identifiers)
if variable.isdynamic():
yield path, description, [identifiers.copy()], identifier_type
else:
yield path, description, None, identifier_type
else:
all_identifiers = child.identifiers()
for identifiers in all_identifiers:
cpath = calc_path(path, identifiers=identifiers)
description = child.description(uncalculated=True)
if child.isdynamic():
yield path, description, identifiers.copy()
if variable.isdynamic():
yield path, description, variable.identifiers().copy(), identifier_type
else:
yield path, description, None
yield path, description, None, identifier_type
class Collect(_ToString):
only_disabled = False
def collect_families(self, family) -> dict:
informations = {}
for child in family.list(uncalculated=True):
@ -431,8 +456,6 @@ class Collect(_ToString):
return None
informations[name] = sub_informations
if child.isleader():
# if not self.default_values:
# child.value.set(sub_informations["gen_examples"][0])
return sub_informations
return None
@ -496,7 +519,10 @@ class Collect(_ToString):
display, properties = self._get_properties(child, informations)
if not display:
return False
informations["path"] = self.doc_path(child.path(uncalculated=True))
path = child.path(uncalculated=True)
informations["path"] = doc_path(path, self.document_a_type)
if path != informations["path"]:
informations["full_path"] = path
informations["name"] = child.name(uncalculated=True)
description = self._get_description(child, family_type)
if description is not None:
@ -516,7 +542,7 @@ class Collect(_ToString):
break
if child.isdynamic():
informations["identifiers"] = []
path = child.path(uncalculated=True)
informations["identifier_type"] = "many"
if child.has_identifiers():
identifiers = child.identifiers()
else:
@ -527,6 +553,7 @@ class Collect(_ToString):
if not self.is_inaccessible_user_data(child_identifier):
informations["identifiers"].append(identifier)
if not informations["identifiers"]:
# doc.default_values is false
informations["identifiers"] = [["example"]]
return True
@ -557,16 +584,14 @@ class Collect(_ToString):
validators.append(msg["description"].format(value))
# get validation information from annotator
for name in child.information.list():
if not name.startswith("validators_calculation"):
continue
calculation = child.information.get("validators_calculation", None)
if calculation:
validators.extend(
self._to_string(
child,
"validators",
)
)
break
if variable_type == "regexp":
validators.append(
_('text based with regular expressions "{0}"').format(child.pattern())
@ -600,7 +625,7 @@ class Collect(_ToString):
annotation = False
if child.information.get(f"{prop}_calculation", False):
annotation = self._to_string(child, prop)
if annotation is None and prop in HIDDEN_PROPERTIES:
if not self.only_disabled and annotation is None and prop in HIDDEN_PROPERTIES:
return False, []
if annotation is True and prop in DISABLED_PROPERTIES:
return False, []
@ -609,7 +634,9 @@ class Collect(_ToString):
elif prop not in properties:
# this property is not in the variable so, do not comment it
continue
elif prop in HIDDEN_PROPERTIES:
elif not self.only_disabled and prop in HIDDEN_PROPERTIES:
return False, []
elif prop in DISABLED_PROPERTIES:
return False, []
prop_obj = {
"type": "property",
@ -662,12 +689,12 @@ class Collect(_ToString):
def _convert_description(self, description, type_):
return to_phrase(description, type_)
def is_inaccessible_user_data(self, child, *, only_disabled=False):
def is_inaccessible_user_data(self, child):
"""If family is not accessible in read_write mode (to load user_data),
do not comment this family
"""
properties = child.property.get(uncalculated=True)
if only_disabled:
if self.only_disabled:
hidden_properties = DISABLED_PROPERTIES
else:
hidden_properties = HIDDEN_PROPERTIES
@ -691,7 +718,7 @@ class Collect(_ToString):
except AttributeError:
variable = None
if variable and self.is_inaccessible_user_data(
variable, only_disabled=only_disabled
variable
):
try:
variable_value = self._get_unmodified_default_value(

View file

@ -112,7 +112,7 @@ cli:
type: boolean
default:
jinja: |-
{{{{ step.output is not propertyerror and step.output != "doc" }}}}
{{{{ step.output is not propertyerror and step.output == "doc" }}}}
description: {_('is true if doc is activate')}
doc:

View file

@ -87,7 +87,7 @@ class RougailOutputDoc(Collect, Examples, Changelog):
def load_formatter(self) -> str:
output_format = self.rougailconfig["doc.output_format"]
self.formatter = self.outputs[output_format](
self.rougailconfig, support_namespace=self.support_namespace
self.rougailconfig, support_namespace=self.support_namespace, document_a_type=self.document_a_type
)
def print(self) -> None:
@ -98,7 +98,6 @@ class RougailOutputDoc(Collect, Examples, Changelog):
def load(self):
self.document_a_type = self.rougailconfig["doc.document_a_type"]
self.modes_level = self.rougailconfig["modes_level"]
self.default_values = self.rougailconfig["doc.default_values"]
self.disabled_modes = []
if self.modes_level:
for mode in self.modes_level:
@ -116,6 +115,8 @@ class RougailOutputDoc(Collect, Examples, Changelog):
self.dynamic_paths = {}
if self.config.isoptiondescription():
informations = self.collect_families(self.config.unrestraint)
# from pprint import pprint
# pprint(informations)
else:
informations = {}
self.collect_variable(self.config, informations)

View file

@ -21,7 +21,6 @@ from ruamel.yaml.representer import RoundTripRepresenter
from tiramisu import Calculation, owners
from .utils import _, dump, to_phrase
@ -53,6 +52,23 @@ class Examples: # pylint: disable=no-member,too-few-public-methods
def gen_doc_examples(self):
"""Return examples"""
datas = []
config = self._build_example_config()
for only_modified in [True, False]:
results = self._gen_doc_examples(config, only_modified)
if results:
if only_modified:
title = _("Example with mandatory variables not filled in")
else:
title = _("Example with all variables modifiable")
datas.append(self.formatter.title(title, self.level))
datas.append(self.formatter.yaml(dump(results)))
end = self.formatter.end_family(self.level)
if end:
datas.append(end)
return self.formatter.compute(datas)
def _build_example_config(self):
self.comment_examples = self.rougailconfig["doc.examples.comment"]
self.level = self.rougailconfig["doc.title_level"]
if self.comment_examples:
@ -63,47 +79,48 @@ class Examples: # pylint: disable=no-member,too-few-public-methods
config.information.set("description_type", "description")
config.property.read_write()
self._set_mandatories(config)
datas = []
for only_modified in [True, False]:
if not only_modified:
self._set_examples(config)
results = CommentedMap()
return config
def _gen_doc_examples(self, config, only_modified: bool):
if not only_modified:
self._set_examples(config)
results = CommentedMap()
if self.true_config == self.config:
root_config = config
true_results = None
n_results = None
else:
root_config = config.option(self.config.path())
current_option = self.true_config
subpaths = self.config.path().split(".")
n_results = CommentedMap()
true_results = n_results
if not self.config.isoptiondescription():
subpaths = subpaths[:-1]
for subpath in subpaths:
current_option = current_option.option(subpath)
name = current_option.name()
new_results = CommentedMap()
self._set_description(new_results, name, current_option)
n_results[name] = new_results
n_results = n_results[name]
if only_modified:
dump_type = 'modified'
else:
dump_type = 'all'
if root_config.isoptiondescription():
self._example_parse_family(
root_config.value.get(), results, dump_type
)
else:
self._set_example_value(
results, root_config, root_config.value.get(), dump_type
)
if true_results and results:
n_results.update(results)
else:
true_results = results
if self.true_config == self.config:
root_config = config
else:
root_config = config.option(self.config.path())
current_option = self.true_config
subpaths = self.config.path().split(".")
if not self.config.isoptiondescription():
subpaths = subpaths[:-1]
for subpath in subpaths:
current_option = current_option.option(subpath)
name = current_option.name()
results[name] = CommentedMap()
self._set_description(results, name, current_option)
results = results[name]
if root_config.isoptiondescription():
self._example_parse_family(
root_config.value.get(), results, only_modified
)
else:
self._set_example_value(
results, root_config, root_config.value.get(), only_modified
)
if results:
if only_modified:
title = _("Example with mandatory variables not filled in")
else:
title = _("Example with all variables modifiable")
datas.extend(
[
self.formatter.title(title, self.level),
self.formatter.yaml(dump(true_results)),
self.formatter.end_family(self.level),
]
)
return self.formatter.compute(datas)
return true_results
def _set_mandatories(self, config):
for calculated_too in [False, True]:
@ -165,7 +182,7 @@ class Examples: # pylint: disable=no-member,too-few-public-methods
if ori_len > current_len:
for idx in reversed(range(current_len, ori_len)):
option.value.pop(idx)
option.value.set(value)
option.unrestraint.value.set(value)
def _get_value_from_example(self, option):
examples = option.information.get("examples", None)
@ -182,49 +199,58 @@ class Examples: # pylint: disable=no-member,too-few-public-methods
return option.issubmulti()
return option.ismulti()
def _example_parse_family(self, config, results, only_modified):
def _example_parse_family(self, config, results, dump_type):
for option, values in config.items():
if option.isoptiondescription():
if option.isleadership():
subresults = self._example_parse_leadership(values, only_modified)
subresults = self._example_parse_leadership(values, dump_type)
if subresults:
name = option.name()
results[name] = subresults
self._set_description(results, name, option)
else:
subresults = CommentedMap()
self._example_parse_family(values, subresults, only_modified)
self._example_parse_family(values, subresults, dump_type)
if subresults:
name = option.name()
results[name] = subresults
self._set_description(results, name, option)
else:
self._set_example_value(results, option, values, only_modified)
self._set_example_value(results, option, values, dump_type)
def _set_example_value(self, results, option, values, only_modified):
if self._is_valid_owner(option, only_modified):
name = option.name()
results[name] = values
self._set_description(results, name, option)
def _set_example_value(self, results, option, values, dump_type):
if not self._is_valid_owner(option, dump_type):
return
if dump_type == "hidden" and values is None:
values = self._get_an_example(option)
name = option.name()
results[name] = values
self._set_description(results, name, option)
def _is_valid_owner(self, option, only_modified):
def _is_valid_owner(self, option, dump_type):
if option.type(only_self=True, translation=False) == "symlink":
return False
if dump_type == "all":
return True
if dump_type == "hidden":
return "hidden" in option.property.get()
is_default = option.owner.isdefault()
return (
option.type(only_self=True, translation=False) != "symlink"
and not only_modified
or (not option.owner.isdefault() and option.owner.get() != owners.forced)
(dump_type == 'modified' and not is_default and option.owner.get() != owners.forced)
or (dump_type == 'default' and is_default)
)
def _example_parse_leadership(self, values, only_modified):
def _example_parse_leadership(self, values, dump_type):
leadership_iter = iter(values.items())
leader, leader_values = next(leadership_iter)
if not self._is_valid_owner(leader, only_modified):
if not self._is_valid_owner(leader, dump_type):
return None
leadership = [CommentedMap() for idx in range(len(leader_values))]
for idx, value in enumerate(leader_values):
self._set_example_value(leadership[idx], leader, value, only_modified)
self._set_example_value(leadership[idx], leader, value, dump_type)
for option, value in leadership_iter:
idx = option.index()
self._set_example_value(leadership[idx], option, value, only_modified)
self._set_example_value(leadership[idx], option, value, dump_type)
return leadership
def _set_description(self, results, name, option):

View file

@ -35,7 +35,7 @@ class Formatter(CommonFormatter):
) -> str:
"""Display family name as a title"""
char = "="
return f"{char * (level + 1)} {title}\n\n"
return f"{char * (level + 1)} {title}"
def join(
self,
@ -122,9 +122,9 @@ class Formatter(CommonFormatter):
prop = self.underline(prop)
return f"`{prop}`"
def yaml(self, _dump: dict) -> str:
def _yaml(self, _dump: str) -> str:
"""Dump yaml part of documentation"""
return f"[,yaml]\n----\n---\n{_dump}\n----\n"
return f"[,yaml]\n----\n{_dump}\n----\n"
def tabular(self, with_header: bool = True) -> str:
"""Transform list to a tabular in string format
@ -157,7 +157,7 @@ class Formatter(CommonFormatter):
return f"====\n{info}\n\n"
def end_family_informations(self) -> str:
return f"\n====\n"
return f"===="
def family_informations_ends_line(self) -> str:
return " +\n"

View file

@ -19,7 +19,41 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
from typing import List
from ..i18n import _
from rougail.error import ExtensionError
from ..utils import dump, CommonFormatter
try:
from rich.jupyter import JupyterMixin
from rich.segment import Segment
from rich.style import Style
from rich.console import Console, ConsoleOptions, RenderResult
from rich.table import Table
from rich.theme import Theme
from rich.syntax import Syntax
except ModuleNotFoundError:
Console = None
if Console:
class BlockQuote(JupyterMixin):
def __init__(
self,
elements: str,
) -> None:
self.elements = elements
self.border_style = Style(color="blue")
def __rich_console__(
self, console: Console, options: ConsoleOptions
) -> RenderResult:
"""Render blockquote to the console."""
render_options = options.update(width=options.max_width - 4)
lines = console.render_lines(self.elements, render_options)
new_line = Segment("\n")
padding = Segment("", style=self.border_style)
for line in lines:
yield padding
yield from line
yield new_line
class Formatter(CommonFormatter):
@ -37,14 +71,8 @@ class Formatter(CommonFormatter):
}
def __init__(self, rougailconfig, **kwargs) -> None:
from rich.table import Table
from rich.theme import Theme
from rich.console import Console
from rich.syntax import Syntax
self.rich_table = Table
self.rich_console = Console
self.rich_syntaxt = Syntax
if not Console:
raise ExtensionError(_("cannot find Python module Rich, please install it!"))
self.custom_theme = Theme(self.titles_color)
self.max_line = 0
super().__init__(rougailconfig, **kwargs)
@ -59,22 +87,24 @@ class Formatter(CommonFormatter):
force_terminal = "xterm-256color"
else:
force_terminal = None
console = self.rich_console(
console = Console(
theme=self.custom_theme, force_terminal=force_terminal
)
with console.capture() as capture:
for data in dico:
console.print(data)
console.print()
return capture.get()
def title(
self,
title: str,
level: int,
collapse: bool=True,
) -> str:
"""Display family name as a title"""
space = " " * (2 * (level - 1))
return f"{space}[title{level}]{title}[/title{level}]\n"
return f"{space}[title{level}]{title}[/title{level}]"
def join(
self,
@ -135,7 +165,7 @@ class Formatter(CommonFormatter):
first_char = ""
char = f"{self.enter_tabular}{first_char}"
else:
char = first_char = f"\n{self.family_informations_starts_line()}"
char = first_char = f"\n"
ret = ""
for idx, choice in enumerate(choices):
if not isinstance(choice, str):
@ -164,9 +194,9 @@ class Formatter(CommonFormatter):
prop = f"[reverse][bold] {prop} [/bold][/reverse]"
return prop
def yaml(self, _dump):
def _yaml(self, _dump: str) -> str:
"""Dump yaml part of documentation"""
return self.rich_syntaxt(f"---\n{_dump}", "yaml")
return Syntax(_dump, "yaml")
def link(
self,
@ -189,7 +219,7 @@ class Formatter(CommonFormatter):
def tabular(self, with_header: bool = True) -> str:
"""Transform list to a tabular in string format"""
tabular = self.rich_table(show_lines=True)
tabular = Table(show_lines=True)
if with_header:
for column in self.tabular_datas.headers():
tabular.add_column(column, width=self.max_line)
@ -197,16 +227,9 @@ class Formatter(CommonFormatter):
tabular.add_row(*data)
return tabular
def family_informations(self) -> str:
info = "[blue]" + self.bold(f"🛈 {_('Informations')}") + "[/blue]"
starts_line = self.family_informations_starts_line()
return starts_line + info + "\n" + starts_line
def family_informations_starts_line(self) -> str:
return "[blue]▌ [/blue]"
def family_informations_ends_line(self) -> str:
return "\n"
def end_family_informations(self) -> str:
return "\n"
def display_family_informations(self, msg) -> str:
msg = ["[blue]" + self.bold(f"🛈 {_('Informations')}") + "\n" + "[/blue]"] + msg
return BlockQuote(self.family_informations_ends_line().join(msg))

View file

@ -45,10 +45,11 @@ class Formatter(CommonFormatter):
self,
title: str,
level: int,
collapse: bool=True,
) -> str:
"""Display family name as a title"""
char = "#"
return f"{char * level} {title}\n\n"
return f"{char * level} {title}"
def join(
self,
@ -103,6 +104,7 @@ class Formatter(CommonFormatter):
with_enter: bool = True,
):
"""Display a liste of element"""
end = ""
if type_ == "variable":
if inside_tabular:
if with_enter:
@ -111,9 +113,12 @@ class Formatter(CommonFormatter):
first_char = f"•&nbsp;"
char = f"{self.enter_tabular}{first_char}"
else:
first_char = char = "\n- "
first_char = "- "
char = "\n- "
else:
char = first_char = f"\n{self.family_informations_starts_line()}- "
first_char = f"{self.family_informations_starts_list_first()}- "
char = f"\n{first_char}"
end = self.family_informations_ends_line()
ret = ""
for idx, choice in enumerate(choices):
if not isinstance(choice, str):
@ -122,9 +127,12 @@ class Formatter(CommonFormatter):
c = first_char
else:
c = char
ret += c + choice
ret += end + c + choice
return ret
def family_informations_starts_list_first(self):
return self.family_informations_starts_line()
def prop(
self,
prop: str,
@ -147,9 +155,9 @@ class Formatter(CommonFormatter):
return lst
return [l + "&nbsp;" * (self.max_line_variable - len(l)) for l in lst]
def yaml(self, _dump):
def _yaml(self, _dump: str) -> str:
"""Dump yaml part of documentation"""
return f"```yaml\n---\n{_dump}\n```\n"
return f"```yaml\n{_dump}\n```"
def link_variable(
self,
@ -163,7 +171,7 @@ class Formatter(CommonFormatter):
link = f"{filename}#{name}"
else:
link = f"#{name}"
return f"[{description}]({link})"
return f'"[{description}]({link})"'
def anchor(
self,
@ -196,24 +204,17 @@ class Formatter(CommonFormatter):
def to_phrase(self, text: str) -> str:
return escape(text)
def family_informations(self) -> str:
starts_line = self.family_informations_starts_line()
return starts_line + "[!NOTE]" + "\n" + starts_line + "\n"
def family_informations_starts_line(self) -> str:
return "> "
def family_informations(self):
start = self.family_informations_starts_line()
return start + "[!NOTE]\n" + start + "\n"
def family_informations_ends_line(self) -> str:
return "\\\n"
def family_informations_starts_line(self) -> str:
return "> "
#
# def family_to_string(self, *args, **kwargs) -> List[str]:
# lst = super().family_to_string(*args, **kwargs)
# if self.name != 'github':
# return lst
# # remove the title
# ret = lst.pop(0)
# if lst:
# ret = "\n> ".join([l.strip() for l in lst]).strip() + "\n\n"
# return [ret]
def display_family_informations(self, msg) -> str:
start = self.family_informations_starts_line()
end = self.family_informations_ends_line()
return self.family_informations() + end.join([start + m for m in msg])

View file

@ -20,19 +20,28 @@ from typing import List
from .github import Formatter as GithubFormatter
from ..utils import dump
from ..i18n import _
class Formatter(GithubFormatter):
name = "gitlab"
level = 51
format_in_title = False
def title(self, title: str, level: int) -> str:
# self.max_line_variable = 0
return "<details><summary>" + title + "</summary>\n\n"
def title(self,
title: str,
level: int,
collapse: bool=True,
) -> str:
if collapse:
return "<details><summary>" + title + "</summary>"
return super().title(title, level, collapse)
def end_family(self, level):
return "</details>\n\n"
def end_family(self, level, collapse: bool=True):
if collapse:
return "</details>"
return None
def columns(
self,
@ -41,8 +50,54 @@ class Formatter(GithubFormatter):
pass
def family_informations(self) -> str:
return f"> [!note] 🛈 {_('Informations')}\n"
return f"> [!note] 🛈 {_('Informations')}"
def table_header(self, lst):
"""Manage the header of a table"""
return lst
def family_informations_ends_line(self) -> str:
return "\n> "
def family_informations_starts_line(self) -> str:
return "\n> "
# def list(self, *args, **kwargs):
# return super().list(*args, **kwargs) + "\n"
def family_informations_starts_list_first(self):
return ""
def list(
self,
choices: list,
*,
inside_tabular: bool = True,
type_: str = "variable",
with_enter: bool = True,
):
"""Display a liste of element"""
end = ""
if type_ == "variable":
if inside_tabular:
if with_enter:
char = first_char = f"{self.enter_tabular}•&nbsp;"
else:
first_char = f"•&nbsp;"
char = f"{self.enter_tabular}{first_char}"
else:
first_char = "- "
char = "\n- "
else:
first_char = f"{self.family_informations_starts_list_first()}- "
char = f"{first_char}"
end = self.family_informations_ends_line()
ret = ""
for idx, choice in enumerate(choices):
if not isinstance(choice, str):
choice = dump(choice)
if not idx:
c = first_char
else:
c = char
ret += end + c + choice
return ret

View file

@ -34,7 +34,7 @@ class Formatter(CommonFormatter):
level: int,
) -> str:
"""Display family name as a title"""
return f"<h{level}>{title}</h{level}>\n\n"
return f"<h{level}>{title}</h{level}>"
def join(
self,
@ -122,7 +122,7 @@ class Formatter(CommonFormatter):
prop = self.underline(prop)
return f"<mark>{prop}</mark>"
def yaml(self, _dump: dict) -> str:
def _yaml(self, _dump: str) -> str:
"""Dump yaml part of documentation"""
return f"<pre>{_dump}</pre>"
@ -144,3 +144,6 @@ class Formatter(CommonFormatter):
def to_phrase(self, text: str) -> str:
return escape(text)
def family_informations_ends_line(self):
return "<br/>"

View file

@ -31,9 +31,4 @@ class Formatter:
def run(self, informations: dict, *args) -> str: # pylint: disable=unused-argument
"""Transform to string"""
# if root:
# current = informations
# for path in root.split('.'):
# current = current[path]["children"]
# informations = current
return dumps(informations, ensure_ascii=False, indent=2)

View file

@ -122,7 +122,7 @@ class CommonTabular:
self.description = self.formatter.get_description(
self.informations,
self.modified_attributes,
self.force_identifiers,
force_identifiers=self.force_identifiers,
)
else:
self.description = None
@ -251,14 +251,16 @@ class CommonFormatter:
"""Class with common function for formatter"""
enter_tabular = "\n"
format_in_title = True
# tabulate module name
name = None
def __init__(self, rougailconfig, support_namespace, **kwargs):
def __init__(self, rougailconfig, support_namespace, document_a_type, **kwargs):
tabulate_module.PRESERVE_WHITESPACE = True
self.header_setted = False
self.rougailconfig = rougailconfig
self.support_namespace = support_namespace
self.document_a_type = document_a_type
def run(self, informations: dict, *, dico_is_already_treated=False) -> str:
"""Transform to string"""
@ -286,13 +288,14 @@ class CommonFormatter:
self.tabular_datas = Tabulars().get()[tabular_template](self)
def compute(self, data):
return "".join([d for d in data if d])
return ENTER.join([d for d in data if d])
# Class you needs implement to your Formatter
def title(
self,
title: str,
level: int,
collapse: bool=True,
) -> str:
"""Display family name as a title"""
raise NotImplementedError()
@ -334,7 +337,9 @@ class CommonFormatter:
filename: Optional[str],
) -> str:
"""Set a text link to variable anchor"""
return description
# return f'"{description}"'
# FIXME OPTION POUR METTRE LE PATH
return f'"{description}" ({path})'
def stripped(
self,
@ -373,13 +378,16 @@ class CommonFormatter:
"""Add a link"""
raise NotImplementedError()
def yaml(self, _dump: str, yaml_version: str="1.1"):
output = f"---\n{_dump}"
if yaml_version == "1.2":
output = f'%YAML 1.2\n{output}\n...'
return self._yaml(output)
##################
def family_informations(self) -> str:
return ""
def end_family_informations(self) -> str:
return ENTER
return None
def display_paths(
self,
@ -399,7 +407,6 @@ class CommonFormatter:
def anchor(path, true_path):
return path
ret_paths = []
path = informations["path"]
if not path:
@ -440,6 +447,10 @@ class CommonFormatter:
)
else:
new = []
if "full_path" in informations:
full_path = informations["full_path"]
else:
full_path = path
if "identifiers" in informations:
for idx, identifier in enumerate(informations["identifiers"]):
if force_identifiers and identifier != force_identifiers:
@ -448,12 +459,12 @@ class CommonFormatter:
if variable_prefix:
path_ = variable_prefix + upper(path_)
if not idx:
path_ = anchor(path_, path)
path_ = anchor(path_, full_path)
if identifier in new:
path_ = self.underline(path_)
ret_paths.append(bold(path_))
else:
ret_paths.append(bold(anchor(variable_prefix + upper(path), path)))
ret_paths.append(bold(anchor(variable_prefix + upper(path), full_path)))
return ret_paths
def tabular_header(
@ -466,8 +477,8 @@ class CommonFormatter:
def _run(self, dico: dict, level: int, dico_is_already_treated: bool) -> str:
"""Parse the dict to transform to dict"""
if dico_is_already_treated:
return "".join(dico)
return "".join([msg for msg in self.dict_to_dict(dico, level, init=True)])
return ENTER.join(dico)
return ENTER.join([msg for msg in self.dict_to_dict(dico, level, init=True)])
def dict_to_dict(
self,
@ -492,7 +503,9 @@ class CommonFormatter:
self.family_to_string(value["informations"], level, namespace)
)
msg.extend(self.dict_to_dict(value["children"], level + 1))
msg.append(self.end_family(level))
end = self.end_family(level)
if end:
msg.append(end)
else:
self.dict_to_dict(
value["children"],
@ -506,7 +519,7 @@ class CommonFormatter:
def namespace_to_title(self, informations: dict, level: int) -> str:
"""manage namespace family"""
return self.title(
self.get_description(informations, {}, None),
self.get_description(informations, {}, title=True),
level,
)
@ -517,7 +530,7 @@ class CommonFormatter:
else:
ret = [
self.title(
self.get_description(informations, {}, None), level
self.get_description(informations, {}, title=True), level,
)
]
msg = []
@ -541,31 +554,33 @@ class CommonFormatter:
self.section(
_("Identifiers"), informations["identifier"], type_="family"
)
)
starts_line = self.family_informations_starts_line()
if msg:
fam_info = self.family_informations()
if fam_info:
ret.append(fam_info)
ret.append(
self.family_informations_ends_line().join(
[starts_line + m for m in msg]
)
+ self.end_family_informations()
)
ret.append(self.display_family_informations(msg))
end = self.end_family_informations()
if end:
ret.append(end)
return ret
def display_family_informations(self, msg) -> str:
fam_info = self.family_informations()
msg = self.family_informations_ends_line().join(msg)
if fam_info:
msg = fam_info + msg
return msg
def family_informations(self) -> str:
return None
def family_informations_starts_line(self) -> str:
return ""
return None
def family_informations_ends_line(self) -> str:
return ENTER
def end_family(self, level: int) -> str:
return ""
def end_family(self, level: int, collapse: bool=True) -> str:
return None
def convert_list_to_string(
self, attribute: str, informations: dict, modified_attributes: dict
) -> str():
@ -596,41 +611,43 @@ class CommonFormatter:
self,
informations: dict,
modified_attributes: dict,
force_identifiers: Optional[str],
*,
force_identifiers: Optional[list]=None,
with_to_phrase: bool=True,
title: bool=False,
) -> str:
add_new_description = True
def _get_description(description, identifiers, delete=False, new=[], previous_identifiers=[], new_identifiers=[], its_a_name=False):
if new_identifiers:
new_identifiers = new_identifiers[0]
# if new_identifiers:
# new_identifiers = new_identifiers[0]
if identifiers and "{{ identifier }}" in description:
lst = []
for i in identifiers:
if not force_identifiers or i == force_identifiers:
identifier = i[-1]
if identifier in new_identifiers:
identifier = self.underline(identifier)
identifier = self.italic(identifier)
lst.append(identifier)
for i in previous_identifiers:
if not force_identifiers or i == force_identifiers:
lst.append(self.italic(self.delete(i)))
if not its_a_name:
identifiers_text = display_list(
lst,
separator="or",
sort=False,
)
description = description.replace(
"{{ identifier }}", identifiers_text
)
if its_a_name:
information_type = "name"
else:
description = display_list(
[description.replace("{{ identifier }}", l) for l in lst],
separator="or",
sort=False,
)
information_type = "description"
if isinstance(informations["path"], dict):
info = informations["path"]
else:
info = informations
path = informations["path"]
if isinstance(path, str):
identifier_type = "many"
else:
identifier_type = path["identifier_type"]
if previous_identifiers:
pass
if not title or self.format_in_title:
formatter = self
else:
formatter = None
description = get_path_from_identifiers(description,
identifiers,
previous_identifiers,
new_identifiers,
identifier_type,
formatter=formatter,
information_type=information_type,
)
elif with_to_phrase:
description = self.to_phrase(description)
if description in new:
@ -639,24 +656,31 @@ class CommonFormatter:
description = self.delete(description)
return description
if force_identifiers:
all_identifiers = force_identifiers
else:
all_identifiers = informations.get("identifiers", [])
if "description" in modified_attributes:
name, previous, new = modified_attributes["description"]
if previous:
identifiers = modified_attributes.get("identifiers", [])
# if modified_attributes has no description
if not identifiers:
identifiers = informations.get("identifiers")
identifiers = all_identifiers
modified_description = _get_description(
previous[0], identifiers, delete=True
)
else:
modified_description = None
elif "identifiers" in modified_attributes and "{{ identifier }}" in informations["description"]:
# FIXME aussi au dessus !
name, previous, new = modified_attributes["identifiers"]
previous_identifiers = previous[-1] if previous else []
new_identifiers = new[-1] if new else []
if new_identifiers:
all_identifiers = [identifier for identifier in all_identifiers if identifier != new_identifiers]
modified_description = _get_description(
informations["description"], informations.get("identifiers"), previous_identifiers=previous_identifiers, new_identifiers=new_identifiers
informations["description"], all_identifiers, previous_identifiers=previous_identifiers, new_identifiers=new_identifiers
)
add_new_description = False
else:
@ -665,11 +689,11 @@ class CommonFormatter:
if add_new_description:
if "description" in informations:
description = _get_description(
informations["description"], informations.get("identifiers"), new=new
informations["description"], all_identifiers, new=new
)
else:
description = _get_description(
informations["name"], informations.get("identifiers"), new=new, its_a_name=True,
informations["name"], all_identifiers, new=new, its_a_name=True,
)
else:
description = None
@ -881,10 +905,15 @@ class CommonFormatter:
underline=False,
)
)
if "multi" in modified_attributes:
properties.append(
self.prop("multiple", italic=False, delete=True, underline=False)
)
if "multiple" in modified_attributes:
if modified_attributes["multiple"][1] and modified_attributes["multiple"][1][0]:
properties.append(
self.prop("multiple", italic=False, delete=True, underline=False)
)
else:
properties.append(
self.prop("multiple", italic=False, delete=False, underline=True)
)
if "properties" not in contents and "properties" in modified_attributes:
for prop in modified_attributes["properties"]:
if prop["ori_name"] == "mandatory":
@ -946,10 +975,15 @@ class CommonFormatter:
]
else:
previous = new = []
if "type" in contents and "variable_type" in modified_attributes:
previous, new = modified_attributes["variable_type"][1:]
properties.append(
self.prop(previous[0], italic=False, delete=True, underline=False)
)
others = []
if "type" in contents and "variable_type" in informations:
others.append({"name": informations["variable_type"], "type": "type"})
if informations.get("multiple"):
if informations.get("multiple") and not "multiple" in modified_attributes:
others.append({"name": "multiple", "type": "multiple"})
if "properties" not in contents and "properties" in informations:
for prop in informations["properties"]:
@ -1063,11 +1097,10 @@ class CommonFormatter:
headers=headers,
tablefmt=self._tabular_name,
)
+ "\n\n"
)
return msg
def message_to_string(self, msg, ret, identifiers=[]):
def message_to_string(self, msg, ret, *, identifiers=[]):
if isinstance(msg, dict):
if "submessage" in msg:
ret += msg["submessage"]
@ -1084,14 +1117,24 @@ class CommonFormatter:
if "." in self.other_root_filenames:
filename = self.other_root_filenames["."]
if "identifiers" in msg["path"]:
msg["identifiers"] = [msg["path"]["identifiers"]]
path = self.link_variable(
calc_path(msg["path"], formatter=self, identifiers=identifiers),
msg["path"]["path"],
self.get_description(msg, {}, None, with_to_phrase=False),
filename=filename,
)
msg = msg["message"].format(path)
msg["identifiers"] = msg["path"]["identifiers"]
calculated_paths = calc_path(msg["path"], formatter=self, identifiers=identifiers)
if isinstance(calculated_paths, list):
msgs = [msg["message"].format(self.link_variable(
doc_path(calculated_path, self.document_a_type),
msg["path"]["path"],
self.get_description(msg, {}, force_identifiers=[msg["path"]["identifiers"][idx]], with_to_phrase=False),
filename=filename,
)) for idx, calculated_path in enumerate(calculated_paths)]
msg = self.list(msgs)
else:
path = self.link_variable(
doc_path(calculated_paths, self.document_a_type),
msg["path"]["path"],
self.get_description(msg, {}, with_to_phrase=False),
filename=filename,
)
msg = msg["message"].format(path)
elif "description" in msg:
if "variables" in msg:
paths = []
@ -1107,6 +1150,10 @@ class CommonFormatter:
if "." in self.other_root_filenames:
filename = self.other_root_filenames["."]
identifiers = variable.get("identifiers")
if self.format_in_title:
formatter = self
else:
formatter = None
path = calc_path(
variable, formatter=self, identifiers=identifiers
)
@ -1180,9 +1227,7 @@ def calc_path(path, *, formatter=None, identifiers: List[str] = None) -> str:
if isinstance(path, dict):
path_ = path["path"]
if "identifiers" in path:
for identifier in path["identifiers"]:
path_ = _path_with_identifier(path_, identifier)
path_ = path_.replace("{{ __identifier__ }}", "{{ identifier }}")
path_ = get_path_from_identifiers(path["path"], path["identifiers"], [], [], path["identifier_type"], formatter)
elif identifiers:
path_ = path
for identifier in identifiers:
@ -1191,3 +1236,92 @@ def calc_path(path, *, formatter=None, identifiers: List[str] = None) -> str:
else:
path_ = path
return path_
def doc_path(path, document_a_type):
if document_a_type:
if "." not in path:
return None
return path.split(".", 1)[-1]
return path
def get_path_from_identifiers(text: str,
all_identifiers: list,
previous_identifiers: list,
new_identifiers: list,
identifier_type: str,
formatter: Optional[object]=None,
information_type="path",
) -> str:
if not isinstance(all_identifiers, list):
raise Exception('hu1?')
if all_identifiers:
for i in all_identifiers:
if not isinstance(i, list):
raise Exception('hu2?')
for j in i:
if isinstance(j, list):
raise Exception('hu3?')
if not isinstance(new_identifiers, list):
raise Exception('hu?')
def _text_with_identifier(information, identifier, delete=False, underline=False):
if identifier is None:
identifier = "{{ __identifier__ }}"
elif information_type == "path":
identifier = normalize_family(str(identifier))
else:
identifier = str(identifier)
if formatter:
if delete:
identifier = formatter.delete(identifier)
if underline:
identifier = formatter.underline(identifier)
identifier = formatter.italic(identifier)
return information.replace("{{ identifier }}", identifier, 1)
if identifier_type == "outside":
separator = "and"
else:
separator = "or"
if information_type == "description":
ori_text = "{{ identifier }}"
else:
ori_text = text
paths = []
identifiers_done = []
for identifiers in all_identifiers:
if information_type != "path":
identifier = identifiers[-1]
if identifier in identifiers_done:
continue
text_ = _text_with_identifier(ori_text, identifiers[-1])
identifiers_done.append(identifier)
else:
text_ = ori_text
for identifier in identifiers:
text_ = _text_with_identifier(text_, identifier)
paths.append(text_)
if formatter:
for identifier in previous_identifiers:
paths.append(_text_with_identifier(ori_text, identifier, delete=True))
for identifier in new_identifiers:
paths.append(_text_with_identifier(ori_text, identifier, underline=True))
if information_type == "description":
if identifier_type == "outside":
paths = [text.replace("{{ identifier }}", path) for path in paths]
return display_list(
paths,
separator=separator,
sort=False,
)
identifiers_text = display_list(
paths,
separator=separator,
sort=False,
)
return text.replace(
"{{ identifier }}", identifiers_text
)
if identifier_type == 'outside':
return paths
return display_list(paths, separator=separator, sort=False)

View file

@ -5,7 +5,7 @@
| Variable | Description
| **family2.var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` | A variable2. +
**Default**: the value of the variable "a second variable"
**Default**: the value of the variable "a second variable" (family.var2).
| **family2.var3** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` | A third variable. +
**Default**: string4 +
@ -14,8 +14,7 @@
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `multiple` `standard` `mandatory` `unique` | Fourth variable. +
**Default**:
* the value of the variable "first variable"
* the value of the variable "a second variable"
* the value of the variable "a third variable"
|====
* the value of the variable "first variable" (var1)
* the value of the variable "a second variable" (family.var2)
* the value of the variable "a third variable" (family2.var3)
|====

View file

@ -2,9 +2,8 @@
| Variable | Description |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="family2.var2" name="family2.var2">family2.var2</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable2.<br/>**Default**: the value of the variable "[a second variable](#family.var2)" |
| **<a id="family2.var2" name="family2.var2">family2.var2</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable2.<br/>**Default**: the value of the variable "[a second variable](#family.var2)". |
| **<a id="family2.var3" name="family2.var3">family2.var3</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A third variable.<br/>**Default**: string4<br/>**Example**: string5 |
| **<a id="family2.subfamily.variable" name="family2.subfamily.variable">family2.subfamily.variable</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `standard` `mandatory` `unique` | Fourth variable.<br/>**Default**: <br/>&nbsp;the value of the variable "[first variable](#var1)"<br/>&nbsp;the value of the variable "[a second variable](#family.var2)"<br/>&nbsp;the value of the variable "[a third variable](#family2.var3)" |
</details>
</details>

View file

@ -2,14 +2,13 @@
<table>
<thead>
<tr><th>Variable </th><th>Description </th></tr>
<tr><th>Variable </th><th>Description </th></tr>
</thead>
<tbody>
<tr><td><b>family2.var2</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>standard</mark> <mark>mandatory</mark> </td><td>A variable2.<br/><b>Default</b>: the value of the variable "a second variable"</td></tr>
<tr><td><b>family2.var3</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>standard</mark> <mark>mandatory</mark> </td><td>A third variable.<br/><b>Default</b>: string4<br/><b>Example</b>: string5 </td></tr>
<tr><td><b>family2.subfamily.variable</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>multiple</mark> <mark>standard</mark> <mark>mandatory</mark> <mark>unique</mark></td><td>Fourth variable.<br/><b>Default</b>: <ul><li>the value of the variable "first variable"</li>
<li>the value of the variable "a second variable"</li>
<li>the value of the variable "a third variable"</li></ul> </td></tr>
<tr><td><b>family2.var2</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>standard</mark> <mark>mandatory</mark> </td><td>A variable2.<br/><b>Default</b>: the value of the variable "a second variable" (family.var2).</td></tr>
<tr><td><b>family2.var3</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>standard</mark> <mark>mandatory</mark> </td><td>A third variable.<br/><b>Default</b>: string4<br/><b>Example</b>: string5 </td></tr>
<tr><td><b>family2.subfamily.variable</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>multiple</mark> <mark>standard</mark> <mark>mandatory</mark> <mark>unique</mark></td><td>Fourth variable.<br/><b>Default</b>: <ul><li>the value of the variable "first variable" (var1)</li>
<li>the value of the variable "a second variable" (family.var2)</li>
<li>the value of the variable "a third variable" (family2.var3)</li></ul> </td></tr>
</tbody>
</table>
</table>

View file

@ -2,7 +2,6 @@
| Variable | Description |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="family2.var2" name="family2.var2">family2.var2</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable2.<br/>**Default**: the value of the variable "[a second variable](#family.var2)" |
| **<a id="family2.var2" name="family2.var2">family2.var2</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable2.<br/>**Default**: the value of the variable "[a second variable](#family.var2)". |
| **<a id="family2.var3" name="family2.var3">family2.var3</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A third variable.<br/>**Default**: string4<br/>**Example**: string5 |
| **<a id="family2.subfamily.variable" name="family2.subfamily.variable">family2.subfamily.variable</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `standard` `mandatory` `unique` | Fourth variable.<br/>**Default**: <br/>&nbsp;the value of the variable "[first variable](#var1)"<br/>&nbsp;the value of the variable "[a second variable](#family.var2)"<br/>&nbsp;the value of the variable "[a third variable](#family2.var3)" |
| **<a id="family2.subfamily.variable" name="family2.subfamily.variable">family2.subfamily.variable</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `standard` `mandatory` `unique` | Fourth variable.<br/>**Default**: <br/>&nbsp;the value of the variable "[first variable](#var1)"<br/>&nbsp;the value of the variable "[a second variable](#family.var2)"<br/>&nbsp;the value of the variable "[a third variable](#family2.var3)" |

View file

@ -5,7 +5,7 @@
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
family2.var2 │ A variable2. │
 string   standard   mandatory  │ Default: the value of the variable │
│ │ "a second variable"
│ │ "a second variable" (family.var2).
├───────────────────────────────────────┼──────────────────────────────────────┤
family2.var3 │ A third variable. │
 string   standard   mandatory  │ Default: string4 │
@ -14,10 +14,10 @@
family2.subfamily.variable │ Fourth variable. │
 string   multiple   standard    │ Default: │
mandatory   unique  │ • the value of the variable "first │
│ │ variable"
│ │ variable" (var1)
│ │ • the value of the variable "a │
│ │ second variable"
│ │ second variable" (family.var2)
│ │ • the value of the variable "a third │
│ │ variable"
│ │ variable" (family2.var3)
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -8,6 +8,6 @@
<details><summary>Deleted variable</summary>
- variable_to_family.var
- variable_to_family.var</details>
</details>

View file

@ -6,5 +6,4 @@
# Deleted variable
- variable_to_family.var

View file

@ -5,5 +5,4 @@
| Variable | Description
| **family.var3** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | A third variable.
|====
|====

View file

@ -4,5 +4,4 @@
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
| **<a id="family.var3" name="family.var3">family.var3</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A third variable. |
</details>
</details>

View file

@ -7,5 +7,4 @@
<tbody>
<tr><td><b>family.var3</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>basic</mark> <mark>mandatory</mark></td><td>A third variable.</td></tr>
</tbody>
</table>
</table>

View file

@ -2,5 +2,4 @@
| Variable | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
| **<a id="family.var3" name="family.var3">family.var3</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A third variable. |
| **<a id="family.var3" name="family.var3">family.var3</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A third variable. |

View file

@ -8,6 +8,6 @@
<details><summary>Deleted variable</summary>
- variable_to_family
- variable_to_family</details>
</details>

View file

@ -6,5 +6,4 @@
# Deleted variable
- variable_to_family

View file

@ -7,5 +7,4 @@
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | A third variable.
| **family2.var4** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | A fourth variable.
|====
|====

View file

@ -5,5 +5,4 @@
| **<a id="family.var3" name="family.var3">family.var3</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A third variable. |
| **<a id="family2.var4" name="family2.var4">family2.var4</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A fourth variable. |
</details>
</details>

View file

@ -8,5 +8,4 @@
<tr><td><b>family.var3</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>basic</mark> <mark>mandatory</mark> </td><td>A third variable. </td></tr>
<tr><td><b>family2.var4</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>basic</mark> <mark>mandatory</mark></td><td>A fourth variable.</td></tr>
</tbody>
</table>
</table>

View file

@ -3,5 +3,4 @@
| Variable | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|
| **<a id="family.var3" name="family.var3">family.var3</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A third variable. |
| **<a id="family2.var4" name="family2.var4">family2.var4</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A fourth variable. |
| **<a id="family2.var4" name="family2.var4">family2.var4</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A fourth variable. |

View file

@ -1,7 +1,7 @@
<details><summary>Deleted variables</summary>
- family2.var2
- family2.var3
- family2.subfamily.variable</details>
- family2.subfamily.variable
</details>

View file

@ -1,6 +1,5 @@
# Deleted variables
- family2.var2
- family2.var3
- family2.subfamily.variable

View file

@ -1,5 +1,5 @@
<details><summary>Deleted variable</summary>
- family.var3
- family.var3</details>
</details>

View file

@ -1,4 +1,3 @@
# Deleted variable
- family.var3

View file

@ -1,6 +1,6 @@
<details><summary>Deleted variables</summary>
- family.var3
- family2.var4</details>
- family2.var4
</details>

View file

@ -1,5 +1,4 @@
# Deleted variables
- family.var3
- family2.var4

View file

@ -5,5 +5,4 @@
| Variable | Description
| **var1** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | #New description.#
|====
|====

View file

@ -4,5 +4,4 @@
|--------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | <ins>New description.</ins> |
</details>
</details>

View file

@ -7,5 +7,4 @@
<tbody>
<tr><td><b>var1</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>basic</mark> <mark>mandatory</mark></td><td><ins>New description.</ins></td></tr>
</tbody>
</table>
</table>

View file

@ -2,5 +2,4 @@
| Variable | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | <ins>New description.</ins> |
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | <ins>New description.</ins> |

View file

@ -6,5 +6,4 @@
| **var1** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +++First variable.+++ +
#New description.#
|====
|====

View file

@ -4,5 +4,4 @@
|--------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | ~~First variable.~~<br/><ins>New description.</ins> |
</details>
</details>

View file

@ -7,5 +7,4 @@
<tbody>
<tr><td><b>var1</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>basic</mark> <mark>mandatory</mark></td><td><del>First variable.</del><br/><ins>New description.</ins></td></tr>
</tbody>
</table>
</table>

View file

@ -2,5 +2,4 @@
| Variable | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | ~~First variable.~~<br/><ins>New description.</ins> |
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | ~~First variable.~~<br/><ins>New description.</ins> |

View file

@ -7,5 +7,4 @@
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | First variable. +
+++First help.+++ +
#Modified help.#
|====
|====

View file

@ -4,5 +4,4 @@
|--------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>~~First help.~~<br/><ins>Modified help.</ins> |
</details>
</details>

View file

@ -7,5 +7,4 @@
<tbody>
<tr><td><b>var1</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>basic</mark> <mark>mandatory</mark></td><td>First variable.<br/><del>First help.</del><br/><ins>Modified help.</ins></td></tr>
</tbody>
</table>
</table>

View file

@ -2,5 +2,4 @@
| Variable | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>~~First help.~~<br/><ins>Modified help.</ins> |
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>~~First help.~~<br/><ins>Modified help.</ins> |

View file

@ -0,0 +1,8 @@
%YAML 1.2
---
version: 1.1
var1:
description: first variable
type: integer
...

View file

@ -0,0 +1,7 @@
%YAML 1.2
---
version: 1.1
var1:
description: first variable
...

View file

@ -0,0 +1,8 @@
== Modified variable
[cols="1a,1a"]
|====
| Variable | Description
| **var1** +
`+++string+++` `#https://rougail.readthedocs.io/en/latest/variable.html#variables-types#[integer]` `basic` `mandatory` | First variable.
|====

View file

@ -0,0 +1,7 @@
<details><summary>Modified variable</summary>
| Variable | Description |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
| **<a id="var1" name="var1">var1</a>**<br/>~~`string`~~ [<ins>`integer`</ins>](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable. |
</details>

View file

@ -0,0 +1,10 @@
<h1>Modified variable</h1>
<table>
<thead>
<tr><th>Variable </th><th>Description </th></tr>
</thead>
<tbody>
<tr><td><b>var1</b><br/><mark><del>string</del></mark> <mark><ins><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>integer</a></ins></mark> <mark>basic</mark> <mark>mandatory</mark></td><td>First variable.</td></tr>
</tbody>
</table>

View file

@ -0,0 +1,5 @@
# Modified variable
| Variable | Description |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
| **<a id="var1" name="var1">var1</a>**<br/>~~`string`~~ [<ins>`integer`</ins>](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable. |

View file

@ -0,0 +1,9 @@
Modified variable
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
var1 │ First variable. │
 string   integer   basic   mandatory │ │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -7,5 +7,4 @@
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | First variable. +
**Validator**: +++"not valid1" is not allowed+++ +
#"not valid2" is not allowed#
|====
|====

View file

@ -4,5 +4,4 @@
|--------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>**Validator**: ~~"not valid1" is not allowed~~<br/><ins>"not valid2" is not allowed</ins> |
</details>
</details>

View file

@ -7,5 +7,4 @@
<tbody>
<tr><td><b>var1</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>string</a></mark> <mark>basic</mark> <mark>mandatory</mark></td><td>First variable.<br/><b>Validator</b>: <del>"not valid1" is not allowed</del><br/><ins>"not valid2" is not allowed</ins></td></tr>
</tbody>
</table>
</table>

View file

@ -2,5 +2,4 @@
| Variable | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>**Validator**: ~~"not valid1" is not allowed~~<br/><ins>"not valid2" is not allowed</ins> |
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>**Validator**: ~~"not valid1" is not allowed~~<br/><ins>"not valid2" is not allowed</ins> |

View file

@ -10,5 +10,4 @@
* +++"not valid2" is not allowed+++
* '"not valid1" is not allowed'
* '#"not valid3" is not allowed#'
|====
|====

View file

@ -4,5 +4,4 @@
|--------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>**Validators**: <br/>&nbsp;~~"not valid2" is not allowed~~<br/>&nbsp;"not valid1" is not allowed<br/>&nbsp;<ins>"not valid3" is not allowed</ins> |
</details>
</details>

View file

@ -9,5 +9,4 @@
<li>'"not valid1" is not allowed'</li>
<li><ins>"not valid3" is not allowed</ins></li></ul> </td></tr>
</tbody>
</table>
</table>

View file

@ -2,5 +2,4 @@
| Variable | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>**Validators**: <br/>&nbsp;~~"not valid2" is not allowed~~<br/>&nbsp;"not valid1" is not allowed<br/>&nbsp;<ins>"not valid3" is not allowed</ins> |
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>**Validators**: <br/>&nbsp;~~"not valid2" is not allowed~~<br/>&nbsp;"not valid1" is not allowed<br/>&nbsp;<ins>"not valid3" is not allowed</ins> |

View file

@ -12,5 +12,4 @@
* '#"not valid4" is not allowed#'
* '"not valid2" is not allowed'
* '#"not valid5" is not allowed#'
|====
|====

View file

@ -4,5 +4,4 @@
|--------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>**Validators**: <br/>&nbsp;~~"not valid1" is not allowed~~<br/>&nbsp;~~"not valid3" is not allowed~~<br/>&nbsp;<ins>"not valid4" is not allowed</ins><br/>&nbsp;"not valid2" is not allowed<br/>&nbsp;<ins>"not valid5" is not allowed</ins> |
</details>
</details>

View file

@ -11,5 +11,4 @@
<li>'"not valid2" is not allowed'</li>
<li><ins>"not valid5" is not allowed</ins></li></ul> </td></tr>
</tbody>
</table>
</table>

View file

@ -2,5 +2,4 @@
| Variable | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>**Validators**: <br/>&nbsp;~~"not valid1" is not allowed~~<br/>&nbsp;~~"not valid3" is not allowed~~<br/>&nbsp;<ins>"not valid4" is not allowed</ins><br/>&nbsp;"not valid2" is not allowed<br/>&nbsp;<ins>"not valid5" is not allowed</ins> |
| **<a id="var1" name="var1">var1</a>**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | First variable.<br/>**Validators**: <br/>&nbsp;~~"not valid1" is not allowed~~<br/>&nbsp;~~"not valid3" is not allowed~~<br/>&nbsp;<ins>"not valid4" is not allowed</ins><br/>&nbsp;"not valid2" is not allowed<br/>&nbsp;<ins>"not valid5" is not allowed</ins> |

View file

@ -9,5 +9,4 @@
* val1 +++← (default)+++
* 'val2 #**← (default)**#'
|====
|====

View file

@ -4,5 +4,4 @@
|-----------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | First variable.<br/>**Choices**: <br/>&nbsp;val1 ~~← (default)~~<br/>&nbsp;val2 <ins>**← (default)**</ins> |
</details>
</details>

View file

@ -8,5 +8,4 @@
<tr><td><b>var1</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>choice</a></mark> <mark>standard</mark> <mark>mandatory</mark></td><td>First variable.<br/><b>Choices</b>: <ul><li>val1 <del>← (default)</del></li>
<li>val2 <ins><b>← (default)</b></ins></li></ul> </td></tr>
</tbody>
</table>
</table>

View file

@ -2,5 +2,4 @@
| Variable | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| **<a id="var1" name="var1">var1</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | First variable.<br/>**Choices**: <br/>&nbsp;val1 ~~← (default)~~<br/>&nbsp;val2 <ins>**← (default)**</ins> |
| **<a id="var1" name="var1">var1</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | First variable.<br/>**Choices**: <br/>&nbsp;val1 ~~← (default)~~<br/>&nbsp;val2 <ins>**← (default)**</ins> |

View file

@ -9,7 +9,6 @@
* +++val1 ← (default)+++
* +++val2+++
* the value of the variable "the first source variable" **← (default)**
* the value of the variable "the second source variable"
|====
* the value of the variable "the first source variable" (source_variable_1) **← (default)**
* the value of the variable "the second source variable" (source_variable_2)
|====

View file

@ -4,5 +4,4 @@
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~val1 ← (default)~~<br/>&nbsp;~~val2~~<br/>&nbsp;the value of the variable "[the first source variable](#source_variable_1)" **← (default)**<br/>&nbsp;the value of the variable "[the second source variable](#source_variable_2)" |
</details>
</details>

View file

@ -7,8 +7,7 @@
<tbody>
<tr><td><b>my_variable</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>choice</a></mark> <mark>standard</mark> <mark>mandatory</mark></td><td>A variable.<br/><b>Choices</b>: <ul><li><del>val1 ← (default)</del></li>
<li><del>val2</del></li>
<li>the value of the variable "the first source variable" <b>← (default)</b></li>
<li>the value of the variable "the second source variable"</li></ul> </td></tr>
<li>the value of the variable "the first source variable" (source_variable_1) <b>← (default)</b></li>
<li>the value of the variable "the second source variable" (source_variable_2)</li></ul> </td></tr>
</tbody>
</table>
</table>

View file

@ -2,5 +2,4 @@
| Variable | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~val1 ← (default)~~<br/>&nbsp;~~val2~~<br/>&nbsp;the value of the variable "[the first source variable](#source_variable_1)" **← (default)**<br/>&nbsp;the value of the variable "[the second source variable](#source_variable_2)" |
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~val1 ← (default)~~<br/>&nbsp;~~val2~~<br/>&nbsp;the value of the variable "[the first source variable](#source_variable_1)" **← (default)**<br/>&nbsp;the value of the variable "[the second source variable](#source_variable_2)" |

View file

@ -8,8 +8,10 @@
│ │ • val1 ← (default) │
│ │ • val2 │
│ │ • the value of the variable "the │
│ │ first source variable" ← (default) │
│ │ first source variable"
│ │ (source_variable_1) ← (default) │
│ │ • the value of the variable "the │
│ │ second source variable"
│ │ (source_variable_2)
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -7,9 +7,8 @@
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | A variable. +
**Choices**:
* +++the value of the variable "the first source variable"+++
* +++the value of the variable "the second source variable"+++
* +++the value of the variable "the first source variable" (source_variable_1)+++
* +++the value of the variable "the second source variable" (source_variable_2)+++
* '#val1 **← (default)**#'
* '#val2#'
|====
|====

View file

@ -4,5 +4,4 @@
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~the value of the variable "[the first source variable](#source_variable_1)"~~<br/>&nbsp;~~the value of the variable "[the second source variable](#source_variable_2)"~~<br/>&nbsp;<ins>val1 **← (default)**</ins><br/>&nbsp;<ins>val2</ins> |
</details>
</details>

View file

@ -5,10 +5,9 @@
<tr><th>Variable </th><th>Description </th></tr>
</thead>
<tbody>
<tr><td><b>my_variable</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>choice</a></mark> <mark>standard</mark> <mark>mandatory</mark></td><td>A variable.<br/><b>Choices</b>: <ul><li><del>the value of the variable "the first source variable"</del></li>
<li><del>the value of the variable "the second source variable"</del></li>
<tr><td><b>my_variable</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>choice</a></mark> <mark>standard</mark> <mark>mandatory</mark></td><td>A variable.<br/><b>Choices</b>: <ul><li><del>the value of the variable "the first source variable" (source_variable_1)</del></li>
<li><del>the value of the variable "the second source variable" (source_variable_2)</del></li>
<li><ins>val1 <b>← (default)</b></ins></li>
<li><ins>val2</ins></li></ul> </td></tr>
</tbody>
</table>
</table>

View file

@ -2,5 +2,4 @@
| Variable | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~the value of the variable "[the first source variable](#source_variable_1)"~~<br/>&nbsp;~~the value of the variable "[the second source variable](#source_variable_2)"~~<br/>&nbsp;<ins>val1 **← (default)**</ins><br/>&nbsp;<ins>val2</ins> |
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~the value of the variable "[the first source variable](#source_variable_1)"~~<br/>&nbsp;~~the value of the variable "[the second source variable](#source_variable_2)"~~<br/>&nbsp;<ins>val1 **← (default)**</ins><br/>&nbsp;<ins>val2</ins> |

View file

@ -6,9 +6,11 @@
my_variable │ A variable. │
 choice   standard   mandatory  │ Choices: │
│ │ • the value of the variable "the  │
│ │ first source variable" │
│ │ first source variable"  │
│ │ (source_variable_1) │
│ │ • the value of the variable "the  │
│ │ second source variable" │
│ │ second source variable"  │
│ │ (source_variable_2) │
│ │ • val1 ← (default) │
│ │ • val2 │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -9,6 +9,5 @@
* +++val1+++
* +++val2+++
* the value of the variable "the first source variable"
|====
* the value of the variable "the first source variable" (source_variable_1).
|====

View file

@ -1,8 +1,7 @@
<details><summary>Modified variable</summary>
| Variable | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~val1~~<br/>&nbsp;~~val2~~<br/>&nbsp;the value of the variable "[the first source variable](#source_variable_1)" |
</details>
| Variable | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~val1~~<br/>&nbsp;~~val2~~<br/>&nbsp;the value of the variable "[the first source variable](#source_variable_1)". |
</details>

View file

@ -7,7 +7,6 @@
<tbody>
<tr><td><b>my_variable</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>choice</a></mark> <mark>basic</mark> <mark>mandatory</mark></td><td>A variable.<br/><b>Choices</b>: <ul><li><del>val1</del></li>
<li><del>val2</del></li>
<li>the value of the variable "the first source variable"</li></ul> </td></tr>
<li>the value of the variable "the first source variable" (source_variable_1).</li></ul> </td></tr>
</tbody>
</table>
</table>

View file

@ -1,6 +1,5 @@
# Modified variable
| Variable | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~val1~~<br/>&nbsp;~~val2~~<br/>&nbsp;the value of the variable "[the first source variable](#source_variable_1)" |
| Variable | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~val1~~<br/>&nbsp;~~val2~~<br/>&nbsp;the value of the variable "[the first source variable](#source_variable_1)". |

View file

@ -9,5 +9,6 @@
│ │ • val2 │
│ │ • the value of the variable "the │
│ │ first source variable"
│ │ (source_variable_1). │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -7,8 +7,7 @@
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `basic` `mandatory` | A variable. +
**Choices**:
* +++the value of the variable "the first source variable"+++
* +++the value of the variable "the first source variable" (source_variable_1).+++
* '#val1#'
* '#val2#'
|====
|====

View file

@ -1,8 +1,7 @@
<details><summary>Modified variable</summary>
| Variable | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~the value of the variable "[the first source variable](#source_variable_1)"~~<br/>&nbsp;<ins>val1</ins><br/>&nbsp;<ins>val2</ins> |
</details>
| Variable | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~the value of the variable "[the first source variable](#source_variable_1)".~~<br/>&nbsp;<ins>val1</ins><br/>&nbsp;<ins>val2</ins> |
</details>

View file

@ -5,9 +5,8 @@
<tr><th>Variable </th><th>Description </th></tr>
</thead>
<tbody>
<tr><td><b>my_variable</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>choice</a></mark> <mark>basic</mark> <mark>mandatory</mark></td><td>A variable.<br/><b>Choices</b>: <ul><li><del>the value of the variable "the first source variable"</del></li>
<tr><td><b>my_variable</b><br/><mark><a href='https://rougail.readthedocs.io/en/latest/variable.html#variables-types'>choice</a></mark> <mark>basic</mark> <mark>mandatory</mark></td><td>A variable.<br/><b>Choices</b>: <ul><li><del>the value of the variable "the first source variable" (source_variable_1).</del></li>
<li><ins>val1</ins></li>
<li><ins>val2</ins></li></ul> </td></tr>
</tbody>
</table>
</table>

View file

@ -1,6 +1,5 @@
# Modified variable
| Variable | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~the value of the variable "[the first source variable](#source_variable_1)"~~<br/>&nbsp;<ins>val1</ins><br/>&nbsp;<ins>val2</ins> |
| Variable | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="my_variable" name="my_variable">my_variable</a>**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A variable.<br/>**Choices**: <br/>&nbsp;~~the value of the variable "[the first source variable](#source_variable_1)".~~<br/>&nbsp;<ins>val1</ins><br/>&nbsp;<ins>val2</ins> |

View file

@ -6,7 +6,8 @@
my_variable │ A variable. │
 choice   basic   mandatory  │ Choices: │
│ │ • the value of the variable "the  │
│ │ first source variable" │
│ │ first source variable"  │
│ │ (source_variable_1). │
│ │ • val1 │
│ │ • val2 │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -9,5 +9,4 @@
* val1
* 'val2 #**← (default)**#'
|====
|====

Some files were not shown because too many files have changed in this diff Show more