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
2025-05-08 21:30:51 +02:00
from . i18n import _
2024-11-27 16:50:48 +01:00
def get_rougail_config (
* ,
backward_compatibility = True ,
) - > dict :
2025-05-08 21:30:51 +02:00
options = f """
2025-12-02 13:59:33 +01:00
display :
description : { _ ( ' Display variables and values ' ) }
help : { _ ( ' Find all the variables and their values in your configuration (structural and user datas). Additional informations are available, such as the default value, the location where the value is loaded, etc. ' ) }
2024-11-27 16:50:48 +01:00
disabled :
2025-12-02 13:59:33 +01:00
jinja : | -
{ { % if step . output is propertyerror or step . output != ' display ' % } }
true
{ { % else % } }
false
2025-05-08 21:30:51 +02:00
{ { % endif % } }
2025-12-02 13:59:33 +01:00
return_type : boolean
description : { _ ( ' if display is not set in " step.output " ' ) }
2025-05-08 21:30:51 +02:00
show_secrets : false # {_('Show secrets instead of obscuring them')}
2025-04-01 21:08:44 +02:00
2025-09-29 10:47:37 +02:00
mandatory :
2025-12-02 13:59:33 +01:00
description : { _ ( ' test mandatories variables before display in display ' ) }
2025-09-29 10:47:37 +02:00
type : boolean
default :
jinja : | -
2025-12-02 13:59:33 +01:00
{ { % if cli . read_write is defined and cli . read_write == true % } }
2025-09-29 10:47:37 +02:00
false
{ { % else % } }
true
{ { % endif % } }
2025-12-02 13:59:33 +01:00
description : { _ ( ' do not test if " cli.read_write " is true ' ) }
2025-04-01 21:08:44 +02:00
2025-12-02 13:59:33 +01:00
max_width :
description : { _ ( " Maximum number of characters per line " ) }
help : { _ ( ' null means unlimited ' ) }
type : integer
2025-11-21 08:08:17 +01:00
mandatory : false
2025-12-02 13:59:33 +01:00
params :
min_integer : 50
2024-11-27 16:50:48 +01:00
"""
return {
2025-12-02 13:59:33 +01:00
" name " : " display " ,
2024-11-27 16:50:48 +01:00
" process " : " output " ,
" options " : options ,
" level " : 40 ,
}
__all__ = ( " get_rougail_config " , )