feat: add doc

This commit is contained in:
egarette@silique.fr 2025-12-24 09:50:07 +01:00
parent e227256ba9
commit a9736adb88
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 formaté en respectant un ensemble de règles : 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, short-hand 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 ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2025-09-29 11:38+0200\n"
"PO-Revision-Date: 2025-09-29 11:46+0200\n"
"POT-Creation-Date: 2025-12-24 09:52+0100\n"
"PO-Revision-Date: 2025-12-24 09:52+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
@ -14,24 +14,54 @@ 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.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}\""
msgstr "\"step.output\" n'est pas défini pour \"{0}\""
#: src/rougail/output_formatter/__init__.py:155
msgid "only one file is allowed"
msgstr "seulement un fichier est autorisé"
#: src/rougail/output_formatter/__init__.py:167
msgid "only one filename is allowed, not \"{0}\""
msgstr "seulement un fichier est autorisé, pas \"{0}\""
#: src/rougail/output_formatter/__init__.py:158
msgid "only a file is allowed"
msgstr "seulement un fichier est autorisé"
#: src/rougail/output_formatter/__init__.py:170
msgid "\"{0}\" is not a valid file, but only a file is allowed"
msgstr ""
"\"{0}\" n'est pas un fichier valide, mais seulement un fichier est autorisé"
#: src/rougail/output_formatter/config.py:59
msgid "Configuration for rougail-ouput-formatter"
msgstr "Configuration pour rougail-ouput-formatter"
#: src/rougail/output_formatter/config.py:34
#: src/rougail/output_formatter/config.py:50
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
msgid "Line size"
msgstr "Taille des lignes"
#: src/rougail/output_formatter/config.py:39
msgid "if formatter is not in \"step.output\""
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, short-hand notation whenever possible, attribute "
"order, re-indentation (especially for Jinja2 templates), ..."
msgstr ""
"Le fichier de structure sera formaté en respectant un ensemble de règles : "
"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 ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-09-29 11:47+0200\n"
"POT-Creation-Date: 2025-12-24 09:52+0100\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,23 +15,40 @@ msgstr ""
"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}\""
msgstr ""
#: src/rougail/output_formatter/__init__.py:155
msgid "only one file is allowed"
#: src/rougail/output_formatter/__init__.py:167
msgid "only one filename is allowed, not \"{0}\""
msgstr ""
#: src/rougail/output_formatter/__init__.py:158
msgid "only a file is allowed"
#: src/rougail/output_formatter/__init__.py:170
msgid "\"{0}\" is not a valid file, but only a file is allowed"
msgstr ""
#: src/rougail/output_formatter/config.py:59
msgid "Configuration for rougail-ouput-formatter"
#: src/rougail/output_formatter/config.py:34
#: src/rougail/output_formatter/config.py:50
msgid "true if formatter is not in \"step.output\""
msgstr ""
#: src/rougail/output_formatter/config.py:61
msgid "Line size"
#: src/rougail/output_formatter/config.py:39
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, short-hand 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 ""

View file

@ -30,16 +30,13 @@ load_unexist_redefine:
type: boolean
default:
jinja: >-
{{% if step.output is not propertyerror and step.output == 'formatter' %}}
true
{{% else %}}
false
{{% endif %}}
{{{{ step.output is not propertyerror and step.output == 'formatter' }}}}
description: {_('true if formatter is not in "step.output"')}
hidden:
jinja: >-
{{% if step.output is not propertyerror and step.output == 'formatter' %}}
load_unexist_redefine is always true with 'formatter' output
{{% endif %}}
{{{{ step.output is not propertyerror and step.output == 'formatter' }}}}
return_type: boolean
description: {_('if formatter is not in "step.output"')}
cli:
@ -49,16 +46,20 @@ cli:
type: boolean
default:
jinja: >-
{{% if step.output is not propertyerror and step.output == 'formatter' %}}
false
{{% else %}}
true
{{% endif %}}
{{{{ step.output is propertyerror or step.output != 'formatter' }}}}
description: {_('true if formatter is not in "step.output"')}
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, short-hand 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 {
"name": "formatter",