feat: ca force true_color terminal when export to console
This commit is contained in:
parent
afb85063ac
commit
bd44db892c
9 changed files with 133 additions and 118 deletions
|
|
@ -5,8 +5,8 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: 2025-10-14 12:54+0200\n"
|
||||
"PO-Revision-Date: 2025-10-14 12:57+0200\n"
|
||||
"POT-Creation-Date: 2025-10-22 16:58+0200\n"
|
||||
"PO-Revision-Date: 2025-10-22 16:59+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\n"
|
||||
|
|
@ -16,43 +16,43 @@ msgstr ""
|
|||
"Generated-By: pygettext.py 1.5\n"
|
||||
"X-Generator: Poedit 3.7\n"
|
||||
|
||||
#: src/rougail/output_doc/annotator.py:323
|
||||
#: src/rougail/output_doc/annotator.py:324
|
||||
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/annotator.py:326
|
||||
#: src/rougail/output_doc/annotator.py:327
|
||||
msgid "the value of the global information \"{0}\""
|
||||
msgstr "la valeur de l'information globale \"{0}\""
|
||||
|
||||
#: src/rougail/output_doc/annotator.py:333
|
||||
#: src/rougail/output_doc/annotator.py:334
|
||||
msgid "when the identifier is \"{0}\""
|
||||
msgstr "lorsque l'identifiant est \"{0}\""
|
||||
|
||||
#: src/rougail/output_doc/annotator.py:335
|
||||
#: src/rougail/output_doc/annotator.py:336
|
||||
msgid "when the identifier is not \"{0}\""
|
||||
msgstr "lorsque l'identifiant n'est pas \"{0}\""
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:114
|
||||
#: src/rougail/output_doc/changelog.py:137
|
||||
msgid "New variable"
|
||||
msgstr "Nouvelle variable"
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:116
|
||||
#: src/rougail/output_doc/changelog.py:139
|
||||
msgid "New variables"
|
||||
msgstr "Nouvelles variables"
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:120
|
||||
#: src/rougail/output_doc/changelog.py:150
|
||||
msgid "Modified variable"
|
||||
msgstr "Variable modifiée"
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:122
|
||||
#: src/rougail/output_doc/changelog.py:152
|
||||
msgid "Modified variables"
|
||||
msgstr "Variables modifiées"
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:126
|
||||
#: src/rougail/output_doc/changelog.py:163
|
||||
msgid "Deleted variable"
|
||||
msgstr "Variable supprimée"
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:128
|
||||
#: src/rougail/output_doc/changelog.py:165
|
||||
msgid "Deleted variables"
|
||||
msgstr "Variables supprimées"
|
||||
|
||||
|
|
@ -100,107 +100,111 @@ msgstr "Valeurs modifiées pour documenter les familles leader ou dynamique"
|
|||
msgid "Generate document in format"
|
||||
msgstr "Générer le document au format"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:326
|
||||
#: src/rougail/output_doc/config.py:151
|
||||
msgid "Force true color terminal"
|
||||
msgstr "Force les vrais couleurs dans le terminal"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:345
|
||||
msgid "This family contains lists of variable blocks."
|
||||
msgstr "Cette famille contient des listes de bloc de variable."
|
||||
|
||||
#: src/rougail/output_doc/doc.py:336
|
||||
#: src/rougail/output_doc/doc.py:355
|
||||
msgid "This family builds families dynamically."
|
||||
msgstr "Cette famille construit des familles dynamiquement."
|
||||
|
||||
#: src/rougail/output_doc/doc.py:350
|
||||
#: src/rougail/output_doc/doc.py:369
|
||||
msgid "Default"
|
||||
msgstr "Défaut"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:365
|
||||
#: src/rougail/output_doc/doc.py:384
|
||||
msgid "multiple"
|
||||
msgstr "multiple"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:373
|
||||
#: src/rougail/output_doc/doc.py:392
|
||||
msgid "Example"
|
||||
msgstr "Exemple"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:376
|
||||
#: src/rougail/output_doc/doc.py:395
|
||||
msgid "Examples"
|
||||
msgstr "Exemples"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:394
|
||||
#: src/rougail/output_doc/doc.py:421
|
||||
msgid "No attribute \"description\" for \"{0}\" in {1}"
|
||||
msgstr "Aucun attribut \"description\" pour \"{0}\" dans {1}"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:531
|
||||
#: src/rougail/output_doc/doc.py:563
|
||||
msgid "text based with regular expressions \"{0}\""
|
||||
msgstr "texte avec expression rationnelle \"{0}\""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:537
|
||||
#: src/rougail/output_doc/doc.py:567
|
||||
msgid "Validator"
|
||||
msgstr "Validateur"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:540
|
||||
#: src/rougail/output_doc/doc.py:570
|
||||
msgid "Validators"
|
||||
msgstr "Validateurs"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:549
|
||||
#: src/rougail/output_doc/doc.py:579
|
||||
msgid "Choices"
|
||||
msgstr "Choix"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:652
|
||||
#: src/rougail/output_doc/doc.py:682
|
||||
msgid "the value of the identifier"
|
||||
msgstr "la valeur de l'identifiant"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:656
|
||||
#: src/rougail/output_doc/doc.py:686
|
||||
msgid "the value of the {0}"
|
||||
msgstr "la valeur de l'{0}"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:665
|
||||
#: src/rougail/output_doc/doc.py:695
|
||||
msgid "depends on a calculation"
|
||||
msgstr "dépend d'un calcul"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:671
|
||||
#: src/rougail/output_doc/doc.py:701
|
||||
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/doc.py:697 src/rougail/output_doc/doc.py:799
|
||||
#: src/rougail/output_doc/doc.py:728 src/rougail/output_doc/doc.py:844
|
||||
msgid "depends on an undocumented variable"
|
||||
msgstr "dépends d'une variable non documentée"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:708
|
||||
#: src/rougail/output_doc/doc.py:744
|
||||
msgid "when the variable \"{0}\" hasn't the value \"{1}\""
|
||||
msgstr "lorsque la variable \"{0}\" n'a pas la valeur \"{1}\""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:710
|
||||
#: src/rougail/output_doc/doc.py:746
|
||||
msgid "when the variable \"{0}\" is defined and hasn't the value \"{1}\""
|
||||
msgstr "lorsque la variable \"{0}\" est définie et n'a pas la valeur \"{1}\""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:713
|
||||
#: src/rougail/output_doc/doc.py:751
|
||||
msgid "when the variable \"{0}\" has the value \"{1}\""
|
||||
msgstr "lorsque la variable \"{0}\" a la valeur \"{1}\""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:715
|
||||
#: src/rougail/output_doc/doc.py:753
|
||||
msgid "when the variable \"{0}\" is defined and has the value \"{1}\""
|
||||
msgstr "lorsque la variable \"{0}\" est définie et a la valeur \"{1}\""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:731
|
||||
#: src/rougail/output_doc/doc.py:771
|
||||
msgid "the value of the variable \"{0}\""
|
||||
msgstr "la valeur de la variable \"{0}\""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:733
|
||||
#: src/rougail/output_doc/doc.py:773
|
||||
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/doc.py:734
|
||||
#: src/rougail/output_doc/doc.py:774
|
||||
msgid "the value of an undocumented variable"
|
||||
msgstr "la valeur d'une variable non documentée"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:770
|
||||
#: src/rougail/output_doc/doc.py:812
|
||||
msgid "the values of undocumented variables"
|
||||
msgstr "les valeurs de variables non documentées"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:789
|
||||
#: src/rougail/output_doc/doc.py:832
|
||||
msgid "(from an undocumented variable)"
|
||||
msgstr "(issue d'une variable non documentée)"
|
||||
|
||||
#: src/rougail/output_doc/doc.py:795
|
||||
#: src/rougail/output_doc/doc.py:840
|
||||
msgid "{0} (from an undocumented variable)"
|
||||
msgstr "{0} (issue d'une variable non documentée)"
|
||||
|
||||
|
|
@ -212,13 +216,13 @@ msgstr "Exemple avec des variables obligatoire non renseignée"
|
|||
msgid "Example with all variables modifiable"
|
||||
msgstr "Exemple avec toutes les variables modifiable"
|
||||
|
||||
#: src/rougail/output_doc/output/console.py:160
|
||||
#: src/rougail/output_doc/utils.py:657
|
||||
#: src/rougail/output_doc/output/console.py:164
|
||||
#: src/rougail/output_doc/utils.py:777
|
||||
msgid "Variable"
|
||||
msgstr "Variable"
|
||||
|
||||
#: src/rougail/output_doc/output/console.py:161
|
||||
#: src/rougail/output_doc/utils.py:657
|
||||
#: src/rougail/output_doc/output/console.py:165
|
||||
#: src/rougail/output_doc/utils.py:777
|
||||
msgid "Description"
|
||||
msgstr "Description"
|
||||
|
||||
|
|
@ -326,21 +330,21 @@ msgstr "ce fichier doit exister"
|
|||
msgid "file type allowed: {0}"
|
||||
msgstr "type de fichier autorisé : {0}"
|
||||
|
||||
#: src/rougail/output_doc/utils.py:312
|
||||
#: src/rougail/output_doc/utils.py:332
|
||||
msgid "Variables for \"{0}\""
|
||||
msgstr "Variables pour \"{0}\""
|
||||
|
||||
#: src/rougail/output_doc/utils.py:336
|
||||
#: src/rougail/output_doc/utils.py:362
|
||||
msgid "Identifiers"
|
||||
msgstr "Identifiants"
|
||||
|
||||
#: src/rougail/output_doc/utils.py:561 src/rougail/output_doc/utils.py:568
|
||||
#: src/rougail/output_doc/utils.py:572 src/rougail/output_doc/utils.py:574
|
||||
#: src/rougail/output_doc/utils.py:576
|
||||
#: src/rougail/output_doc/utils.py:654 src/rougail/output_doc/utils.py:663
|
||||
#: src/rougail/output_doc/utils.py:669 src/rougail/output_doc/utils.py:675
|
||||
#: src/rougail/output_doc/utils.py:679
|
||||
msgid "(default)"
|
||||
msgstr "(défaut)"
|
||||
|
||||
#: src/rougail/output_doc/utils.py:697
|
||||
#: src/rougail/output_doc/utils.py:827
|
||||
msgid "{0}: {1}"
|
||||
msgstr "{0} : {1}"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2025-10-14 12:57+0200\n"
|
||||
"POT-Creation-Date: 2025-10-22 16:59+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"
|
||||
|
|
@ -15,43 +15,43 @@ msgstr ""
|
|||
"Generated-By: pygettext.py 1.5\n"
|
||||
|
||||
|
||||
#: src/rougail/output_doc/annotator.py:323
|
||||
#: src/rougail/output_doc/annotator.py:324
|
||||
msgid "the value of the information \"{0}\" of the variable \"{1}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/annotator.py:326
|
||||
#: src/rougail/output_doc/annotator.py:327
|
||||
msgid "the value of the global information \"{0}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/annotator.py:333
|
||||
#: src/rougail/output_doc/annotator.py:334
|
||||
msgid "when the identifier is \"{0}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/annotator.py:335
|
||||
#: src/rougail/output_doc/annotator.py:336
|
||||
msgid "when the identifier is not \"{0}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:114
|
||||
#: src/rougail/output_doc/changelog.py:137
|
||||
msgid "New variable"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:116
|
||||
#: src/rougail/output_doc/changelog.py:139
|
||||
msgid "New variables"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:120
|
||||
#: src/rougail/output_doc/changelog.py:150
|
||||
msgid "Modified variable"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:122
|
||||
#: src/rougail/output_doc/changelog.py:152
|
||||
msgid "Modified variables"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:126
|
||||
#: src/rougail/output_doc/changelog.py:163
|
||||
msgid "Deleted variable"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/changelog.py:128
|
||||
#: src/rougail/output_doc/changelog.py:165
|
||||
msgid "Deleted variables"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -99,107 +99,111 @@ msgstr ""
|
|||
msgid "Generate document in format"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:326
|
||||
#: src/rougail/output_doc/config.py:151
|
||||
msgid "Force true color terminal"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:345
|
||||
msgid "This family contains lists of variable blocks."
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:336
|
||||
#: src/rougail/output_doc/doc.py:355
|
||||
msgid "This family builds families dynamically."
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:350
|
||||
#: src/rougail/output_doc/doc.py:369
|
||||
msgid "Default"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:365
|
||||
#: src/rougail/output_doc/doc.py:384
|
||||
msgid "multiple"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:373
|
||||
#: src/rougail/output_doc/doc.py:392
|
||||
msgid "Example"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:376
|
||||
#: src/rougail/output_doc/doc.py:395
|
||||
msgid "Examples"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:394
|
||||
#: src/rougail/output_doc/doc.py:421
|
||||
msgid "No attribute \"description\" for \"{0}\" in {1}"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:531
|
||||
#: src/rougail/output_doc/doc.py:563
|
||||
msgid "text based with regular expressions \"{0}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:537
|
||||
#: src/rougail/output_doc/doc.py:567
|
||||
msgid "Validator"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:540
|
||||
#: src/rougail/output_doc/doc.py:570
|
||||
msgid "Validators"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:549
|
||||
#: src/rougail/output_doc/doc.py:579
|
||||
msgid "Choices"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:652
|
||||
#: src/rougail/output_doc/doc.py:682
|
||||
msgid "the value of the identifier"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:656
|
||||
#: src/rougail/output_doc/doc.py:686
|
||||
msgid "the value of the {0}"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:665
|
||||
#: src/rougail/output_doc/doc.py:695
|
||||
msgid "depends on a calculation"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:671
|
||||
#: src/rougail/output_doc/doc.py:701
|
||||
msgid "\"{0}\" is a calculation for {1} but has no description in {2}"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:697 src/rougail/output_doc/doc.py:799
|
||||
#: src/rougail/output_doc/doc.py:728 src/rougail/output_doc/doc.py:844
|
||||
msgid "depends on an undocumented variable"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:708
|
||||
#: src/rougail/output_doc/doc.py:744
|
||||
msgid "when the variable \"{0}\" hasn't the value \"{1}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:710
|
||||
#: src/rougail/output_doc/doc.py:746
|
||||
msgid "when the variable \"{0}\" is defined and hasn't the value \"{1}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:713
|
||||
#: src/rougail/output_doc/doc.py:751
|
||||
msgid "when the variable \"{0}\" has the value \"{1}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:715
|
||||
#: src/rougail/output_doc/doc.py:753
|
||||
msgid "when the variable \"{0}\" is defined and has the value \"{1}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:731
|
||||
#: src/rougail/output_doc/doc.py:771
|
||||
msgid "the value of the variable \"{0}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:733
|
||||
#: src/rougail/output_doc/doc.py:773
|
||||
msgid "the value of the variable \"{0}\" if it is defined"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:734
|
||||
#: src/rougail/output_doc/doc.py:774
|
||||
msgid "the value of an undocumented variable"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:770
|
||||
#: src/rougail/output_doc/doc.py:812
|
||||
msgid "the values of undocumented variables"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:789
|
||||
#: src/rougail/output_doc/doc.py:832
|
||||
msgid "(from an undocumented variable)"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/doc.py:795
|
||||
#: src/rougail/output_doc/doc.py:840
|
||||
msgid "{0} (from an undocumented variable)"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -211,13 +215,13 @@ msgstr ""
|
|||
msgid "Example with all variables modifiable"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/output/console.py:160
|
||||
#: src/rougail/output_doc/utils.py:657
|
||||
#: src/rougail/output_doc/output/console.py:164
|
||||
#: src/rougail/output_doc/utils.py:777
|
||||
msgid "Variable"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/output/console.py:161
|
||||
#: src/rougail/output_doc/utils.py:657
|
||||
#: src/rougail/output_doc/output/console.py:165
|
||||
#: src/rougail/output_doc/utils.py:777
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -325,21 +329,21 @@ msgstr ""
|
|||
msgid "file type allowed: {0}"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/utils.py:312
|
||||
#: src/rougail/output_doc/utils.py:332
|
||||
msgid "Variables for \"{0}\""
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/utils.py:336
|
||||
#: src/rougail/output_doc/utils.py:362
|
||||
msgid "Identifiers"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/utils.py:561 src/rougail/output_doc/utils.py:568
|
||||
#: src/rougail/output_doc/utils.py:572 src/rougail/output_doc/utils.py:574
|
||||
#: src/rougail/output_doc/utils.py:576
|
||||
#: src/rougail/output_doc/utils.py:654 src/rougail/output_doc/utils.py:663
|
||||
#: src/rougail/output_doc/utils.py:669 src/rougail/output_doc/utils.py:675
|
||||
#: src/rougail/output_doc/utils.py:679
|
||||
msgid "(default)"
|
||||
msgstr ""
|
||||
|
||||
#: src/rougail/output_doc/utils.py:697
|
||||
#: src/rougail/output_doc/utils.py:827
|
||||
msgid "{0}: {1}"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -146,6 +146,11 @@ doc:
|
|||
)
|
||||
for output in outputs:
|
||||
rougail_options += f" - {output}\n"
|
||||
rougail_options += f"""
|
||||
force_true_color_terminal:
|
||||
description: {_('Force true color terminal')}
|
||||
default: false
|
||||
"""
|
||||
return {
|
||||
"name": "doc",
|
||||
"process": "output",
|
||||
|
|
|
|||
|
|
@ -92,7 +92,11 @@ class RougailOutputDoc(Examples, Changelog):
|
|||
self.with_family = True
|
||||
if "changelog" in self.contents:
|
||||
self.previous_json_file = rougailconfig["doc.previous_json_file"]
|
||||
self.formater = outputs[output_format](self.with_family)
|
||||
if output_format == 'console':
|
||||
force_true_color_terminal = rougailconfig["doc.force_true_color_terminal"]
|
||||
else:
|
||||
force_true_color_terminal = None
|
||||
self.formater = outputs[output_format](self.with_family, force_true_color_terminal=force_true_color_terminal)
|
||||
self.informations = None
|
||||
try:
|
||||
groups.namespace
|
||||
|
|
@ -205,22 +209,17 @@ class RougailOutputDoc(Examples, Changelog):
|
|||
variable_path, value, condition = calculation["value"]
|
||||
variable = self.conf.forcepermissive.option(variable_path)
|
||||
try:
|
||||
variable_value = variable.value.get()
|
||||
except AttributeError as err:
|
||||
pass
|
||||
else:
|
||||
uncalculated = variable.value.get(uncalculated=True)
|
||||
if (
|
||||
not isinstance(uncalculated, Calculation)
|
||||
and self.is_inaccessible_user_data(variable)
|
||||
and (
|
||||
condition == "when"
|
||||
and value == variable_value
|
||||
or condition == "when_not"
|
||||
and value != variable_value
|
||||
)
|
||||
):
|
||||
return True
|
||||
variable.value.get()
|
||||
except AttributeError:
|
||||
variable = None
|
||||
if variable and self.is_inaccessible_user_data(variable):
|
||||
try:
|
||||
variable_value = self._get_unmodified_default_value(variable)
|
||||
except VariableCalculationDependencyError:
|
||||
pass
|
||||
else:
|
||||
if (condition == "when" and value == variable_value) or (condition == "when_not" and value != variable_value):
|
||||
return True
|
||||
if not child.isoptiondescription():
|
||||
for hidden_property in self.disabled_modes:
|
||||
if hidden_property in properties:
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -36,22 +36,25 @@ class Formater(CommonFormater):
|
|||
"title5": "dark_green underline bold",
|
||||
}
|
||||
|
||||
def __init__(self, with_family: bool) -> None:
|
||||
def __init__(self, with_family: bool, force_true_color_terminal: bool=False) -> None:
|
||||
from rich.table import Table
|
||||
from rich.theme import Theme
|
||||
from rich.console import Console
|
||||
|
||||
self.rich_table = Table
|
||||
self.rich_console = Console
|
||||
if force_true_color_terminal:
|
||||
self.force_terminal = 'xterm-256color'
|
||||
else:
|
||||
self.force_terminal = None
|
||||
self.custom_theme = Theme(self.titles_color)
|
||||
self.max_line = 0
|
||||
super().__init__(with_family)
|
||||
|
||||
def run(self, dico: dict, level: int, *, dico_is_already_treated=False) -> str:
|
||||
|
||||
if not dico_is_already_treated:
|
||||
dico = self.dict_to_dict(dico, level)
|
||||
console = self.rich_console(theme=self.custom_theme)
|
||||
console = self.rich_console(theme=self.custom_theme, force_terminal=self.force_terminal)
|
||||
with console.capture() as capture:
|
||||
for data in dico:
|
||||
console.print(data)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class Formater(CommonFormater):
|
|||
level = 50
|
||||
enter_table = "<br/>"
|
||||
|
||||
def __init__(self, with_family: bool) -> None:
|
||||
def __init__(self, with_family: bool, **kwarg) -> None:
|
||||
self.max_line_variable = 0
|
||||
self.max_line_description = 0
|
||||
super().__init__(with_family)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Formater:
|
|||
name = "json"
|
||||
level = 90
|
||||
|
||||
def __init__(self, with_family: bool):
|
||||
def __init__(self, with_family: bool, **kwarg):
|
||||
pass
|
||||
|
||||
def run(self, dico: dict, *args) -> str: # pylint: disable=unused-argument
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class CommonFormater:
|
|||
# tabulate module name
|
||||
name = None
|
||||
|
||||
def __init__(self, with_family: bool):
|
||||
def __init__(self, with_family: bool, **kwarg):
|
||||
tabulate_module.PRESERVE_WHITESPACE = True
|
||||
self.header_setted = False
|
||||
self.with_family = with_family
|
||||
|
|
|
|||
Loading…
Reference in a new issue