Start improve OLC menu docs and help texts
This commit is contained in:
parent
a954f9c723
commit
e4016e435e
5 changed files with 203 additions and 29 deletions
|
|
@ -796,7 +796,7 @@ class EvMenu(object):
|
|||
|
||||
# handle the helptext
|
||||
if helptext:
|
||||
self.helptext = helptext
|
||||
self.helptext = self.helptext_formatter(helptext)
|
||||
elif options:
|
||||
self.helptext = _HELP_FULL if self.auto_quit else _HELP_NO_QUIT
|
||||
else:
|
||||
|
|
@ -898,6 +898,19 @@ class EvMenu(object):
|
|||
"""
|
||||
return dedent(nodetext).strip()
|
||||
|
||||
def helptext_formatter(self, helptext):
|
||||
"""
|
||||
Format the node's help text
|
||||
|
||||
Args:
|
||||
helptext (str): The unformatted help text for the node.
|
||||
|
||||
Returns:
|
||||
helptext (str): The formatted help text.
|
||||
|
||||
"""
|
||||
return dedent(helptext).strip()
|
||||
|
||||
def options_formatter(self, optionlist):
|
||||
"""
|
||||
Formats the option block.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue