rougail-output-display/src/rougail/output_console/config.py

54 lines
1.5 KiB
Python
Raw Normal View History

2024-11-27 16:50:48 +01:00
"""
Silique (https://www.silique.fr)
2025-02-10 09:54:59 +01:00
Copyright (C) 2024-2025
2024-11-27 16:50:48 +01:00
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from pathlib import Path
from .i18n import _
2024-11-27 16:50:48 +01:00
def get_rougail_config(
*,
backward_compatibility=True,
) -> dict:
options = f"""
2024-11-27 16:50:48 +01:00
console:
description: {_('Configuration rougail-console')}
2024-11-27 16:50:48 +01:00
disabled:
jinja: |
{{% if step.output is propertyerror or step.output != 'console' %}}
2024-11-27 16:50:48 +01:00
disabled
{{% endif %}}
read_write: false # {_('Display variables available in read_write mode')}
2025-04-01 21:08:44 +02:00
show_secrets: false # {_('Show secrets instead of obscuring them')}
2025-04-01 21:08:44 +02:00
mandatory: true # {_('Test mandatories variable before display in console')}
2025-04-01 21:08:44 +02:00
key_is_description: true # {_("In tree the key is the family or variable description inside of it's name")}
2024-11-27 16:50:48 +01:00
"""
return {
"name": "console",
"process": "output",
"options": options,
"level": 40,
}
__all__ = ("get_rougail_config",)