feat: add doc

This commit is contained in:
egarette@silique.fr 2025-12-24 09:50:07 +01:00
parent e227256ba9
commit 8b6e6bd428
6 changed files with 128 additions and 42 deletions

20
README.fr.md Normal file
View file

@ -0,0 +1,20 @@
---
gitea: none
include_toc: true
---
[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md)
## Reformater les fichiers de structure
> [!NOTE]
>
> Le fichier de structure sera formater en respectant un ensemble de règle : ligne vide entre chaque variable, notation condensée dès que possible, ordre des attributs, réindentation (notamment pour les templates Jinja2), ...\
> **Chemin** : formatter\
> *`désactivé`*\
> **Désactivé** : si formatter n'est pas défini dans "[Sélection pour sortie](#step.output)"
| Variable | Description | Valeur par défaut | Type |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|---------------------|---------------------------------------------------------------------------------------------------|
| **<a id="formatter.line_width" name="formatter.line_width">formatter.line_width</a>**<br/>**Ligne de commande** : <br/>--formatter.line_width<br/>**Variable d'environnement** : FORMATTER.LINE_WIDTH | Taille maximum des lignes. | 120 | [`integer`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` |

View file

@ -1,2 +1,20 @@
# rougail-output-formatter ---
gitea: none
include_toc: true
---
[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md)
## Reformat the structure files
> [!NOTE]
>
> The structure file will be formatted according to a set of rules: empty line between each variable, condensed notation whenever possible, attribute order, re-indentation (especially for Jinja2 templates), ...\
> **Path**: formatter\
> *`disabled`*\
> **Disabled**: if formatter is not set in "[Select for output](#step.output)"
| Variable | Description | Default value | Type |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|-----------------|-------------------------------------------------------------------------------------------------|
| **<a id="formatter.line_width" name="formatter.line_width">formatter.line_width</a>**<br/>**Command line**: <br/>--formatter.line_width<br/>**Environment variable**: FORMATTER.LINE_WIDTH | Maximum line size. | 120 | [`integer`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` |

View file

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"POT-Creation-Date: 2025-09-29 11:38+0200\n" "POT-Creation-Date: 2025-12-24 09:47+0100\n"
"PO-Revision-Date: 2025-09-29 11:46+0200\n" "PO-Revision-Date: 2025-12-24 09:49+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: fr\n" "Language: fr\n"
@ -14,24 +14,54 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.7\n" "X-Generator: Poedit 3.8\n"
#: src/rougail/output_formatter/__init__.py:105 #: src/rougail/output_formatter/__init__.py:119
msgid "the \"step.output\" is not set to \"{0}\"" msgid "the \"step.output\" is not set to \"{0}\""
msgstr "\"step.output\" n'est pas défini pour \"{0}\"" msgstr "\"step.output\" n'est pas défini pour \"{0}\""
#: src/rougail/output_formatter/__init__.py:155 #: src/rougail/output_formatter/__init__.py:167
msgid "only one file is allowed" msgid "only one filename is allowed, not \"{0}\""
msgstr "seulement un fichier est autorisé" msgstr "seulement un fichier est autorisé, pas \"{0}\""
#: src/rougail/output_formatter/__init__.py:158 #: src/rougail/output_formatter/__init__.py:170
msgid "only a file is allowed" msgid "\"{0}\" is not a valid file, but only a file is allowed"
msgstr "seulement un fichier est autorisé" msgstr ""
"\"{0}\" n'est pas un fichier valide, mais seulement un fichier est autorisé"
#: src/rougail/output_formatter/config.py:59 #: src/rougail/output_formatter/config.py:34
msgid "Configuration for rougail-ouput-formatter" #: src/rougail/output_formatter/config.py:50
msgstr "Configuration pour rougail-ouput-formatter" msgid "true if formatter is not in \"step.output\""
msgstr "trus si formatter n'est pas dans \"step.output\""
#: src/rougail/output_formatter/config.py:61 #: src/rougail/output_formatter/config.py:39
msgid "Line size" msgid "if formatter is not in \"step.output\""
msgstr "Taille des lignes" msgstr "si formatter n'est pas dans \"step.output\""
#: src/rougail/output_formatter/config.py:53
msgid "Reformat the structure files"
msgstr "Reformater les fichiers de structure"
#: src/rougail/output_formatter/config.py:55
msgid ""
"The structure file will be formatted according to a set of rules: empty line "
"between each variable, condensed notation whenever possible, attribute "
"order, re-indentation (especially for Jinja2 templates), ..."
msgstr ""
"Le fichier de structure sera formater en respectant un ensemble de règle : "
"ligne vide entre chaque variable, notation condensée dès que possible, ordre "
"des attributs, réindentation (notamment pour les templates Jinja2), ..."
#: src/rougail/output_formatter/config.py:60
msgid "if formatter is not set in \"step.output\""
msgstr "si formatter n'est pas défini dans \"step.output\""
#: src/rougail/output_formatter/config.py:62
msgid "Maximum line size"
msgstr "Taille maximum des lignes"
#~ msgid "only a file is allowed"
#~ msgstr "seulement un fichier est autorisé"
#~ msgid "Configuration for rougail-ouput-formatter"
#~ msgstr "Configuration pour rougail-ouput-formatter"

View file

@ -5,7 +5,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-09-29 11:47+0200\n" "POT-Creation-Date: 2025-12-24 09:50+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -15,23 +15,40 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
#: src/rougail/output_formatter/__init__.py:105 #: src/rougail/output_formatter/__init__.py:119
msgid "the \"step.output\" is not set to \"{0}\"" msgid "the \"step.output\" is not set to \"{0}\""
msgstr "" msgstr ""
#: src/rougail/output_formatter/__init__.py:155 #: src/rougail/output_formatter/__init__.py:167
msgid "only one file is allowed" msgid "only one filename is allowed, not \"{0}\""
msgstr "" msgstr ""
#: src/rougail/output_formatter/__init__.py:158 #: src/rougail/output_formatter/__init__.py:170
msgid "only a file is allowed" msgid "\"{0}\" is not a valid file, but only a file is allowed"
msgstr "" msgstr ""
#: src/rougail/output_formatter/config.py:59 #: src/rougail/output_formatter/config.py:34
msgid "Configuration for rougail-ouput-formatter" #: src/rougail/output_formatter/config.py:50
msgid "true if formatter is not in \"step.output\""
msgstr "" msgstr ""
#: src/rougail/output_formatter/config.py:61 #: src/rougail/output_formatter/config.py:39
msgid "Line size" msgid "if formatter is not in \"step.output\""
msgstr ""
#: src/rougail/output_formatter/config.py:53
msgid "Reformat the structure files"
msgstr ""
#: src/rougail/output_formatter/config.py:55
msgid "The structure file will be formatted according to a set of rules: empty line between each variable, condensed notation whenever possible, attribute order, re-indentation (especially for Jinja2 templates), ..."
msgstr ""
#: src/rougail/output_formatter/config.py:60
msgid "if formatter is not set in \"step.output\""
msgstr ""
#: src/rougail/output_formatter/config.py:62
msgid "Maximum line size"
msgstr "" msgstr ""

View file

@ -30,16 +30,13 @@ load_unexist_redefine:
type: boolean type: boolean
default: default:
jinja: >- jinja: >-
{{% if step.output is not propertyerror and step.output == 'formatter' %}} {{{{ step.output is not propertyerror and step.output == 'formatter' }}}}
true description: {_('true if formatter is not in "step.output"')}
{{% else %}}
false
{{% endif %}}
hidden: hidden:
jinja: >- jinja: >-
{{% if step.output is not propertyerror and step.output == 'formatter' %}} {{{{ step.output is not propertyerror and step.output == 'formatter' }}}}
load_unexist_redefine is always true with 'formatter' output return_type: boolean
{{% endif %}} description: {_('if formatter is not in "step.output"')}
cli: cli:
@ -49,16 +46,20 @@ cli:
type: boolean type: boolean
default: default:
jinja: >- jinja: >-
{{% if step.output is not propertyerror and step.output == 'formatter' %}} {{{{ step.output is propertyerror or step.output != 'formatter' }}}}
false description: {_('true if formatter is not in "step.output"')}
{{% else %}}
true
{{% endif %}}
formatter: formatter:
description: {_('Configuration for rougail-ouput-formatter')} description: {_('Reformat the structure files')}
help: |-
{_('The structure file will be formatted according to a set of rules: empty line between each variable, condensed notation whenever possible, attribute order, re-indentation (especially for Jinja2 templates), ...')}
disabled:
jinja: >-
{{{{ step.output is propertyerror or step.output != 'formatter' }}}}
return_type: boolean
description: {_('if formatter is not set in "step.output"')}
line_width: 120 # {_('Line size')} line_width: 120 # {_('Maximum line size')}
""" """
return { return {
"name": "formatter", "name": "formatter",