""" Silique (https://www.silique.fr) Copyright (C) 2025 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 . """ from .i18n import _ def get_rougail_config( *, backward_compatibility: bool = True, # pylint: disable=unused-argument ) -> dict: options = f""" cli: description: {_('Command line options')} config_file: description: {_('Loads command line parameters from a file')} type: unix_filename commandline: false params: allow_relative: true default: - .rougailcli.yml debug: false # {_('Displays debug informations')} warnings: true # {_('Displays command line option warnings informations')} versions: false # {_('Displays Rougail version and all its components')} invalid_user_data_error: false # {_("Invalid value in user data is not allowed")} unknown_user_data_error: false # {_("Unknown variable in user data is not allowed")} layers: description: {_('Open each user data in separate layers')} default: false hidden: jinja: |- {{{{ __.step.user_data is propertyerror or __.step.user_data | length < 2 }}}} return_type: boolean description: {_('if only one user data is set in "__.step.user_data"')} load_config: default: true hidden: true read_write: false # {_('Configuration in output step is in read_write mode')} description_type: description: {_('Type of variables description')} help: >- {_("""To identify different variables, we use the variable description. There are four types of description: - path_and_description: which contains the variable path followed by its description - name_and_description: which contains the variable name followed by its description - path: the variable's path - name: the variable name - description: the variable's description""")} choices: - path_and_description - name_and_description - path - name - description default: description inaccessible_read_write_modes: description: {_('Modes that should not be accessible in read_write mode')} multi: true mandatory: false disabled: jinja: | {{{{ not modes_level }}}} return_type: boolean description: {_('if any mode is set in "modes_level"')} validators: - type: jinja jinja: | {{% if _.inaccessible_read_write_modes not in modes_level %}} not in modes_level ({{modes_level}}) {{% endif %}} description: {_('mode must exists in "modes_level"')} inaccessible_modes: description: {_('Modes that should not be accessible')} multi: true mandatory: false disabled: jinja: | {{{{ not modes_level }}}} return_type: boolean description: {_('if any mode is set in "modes_level"')} validators: - type: jinja jinja: | {{% if _.inaccessible_modes not in modes_level %}} not in modes_level ({{modes_level}}) {{% endif %}} description: {_('mode must exists in "modes_level"')} """ return { "options": options, "process": None, }