mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] add command from subcategories in manpage
This commit is contained in:
parent
78391045d8
commit
252e3157b7
1 changed files with 29 additions and 0 deletions
|
@ -89,4 +89,33 @@ usage: yunohost {{ name }} {{ '{' }}{{ ",".join(value["actions"].keys()) }}{{ '}
|
|||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{# each subcategory #}
|
||||
{% for subcategory_name, subcategory in value.get("subcategories", {}).items() %}
|
||||
{% for action, action_value in subcategory["actions"].items() %}
|
||||
.SS "yunohost {{ subcategory_name }} {{ name }} {{ action }} \
|
||||
{% for argument_name, argument_value in action_value.get("arguments", {}).items() %}\
|
||||
{% set required=(not str(argument_name).startswith("-")) or argument_value.get("extra", {}).get("required", False) %}\
|
||||
{% if not required %}[{% endif %}\
|
||||
\fI\,{{ argument_name }}\/\fR{% if argument_value.get("full") %}|\fI\,{{ argument_value["full"] }}\fR{% endif %}\
|
||||
{% if str(argument_name).startswith("-") and not argument_value.get("action") == "store_true" %} {{ (argument_value.get("full", argument_name)).lstrip("-") }}{% endif %}\
|
||||
{% if not required %}]{% endif %} \
|
||||
{% endfor %}"
|
||||
|
||||
{# help of the command #}
|
||||
{{ action_value["action_help"] }}
|
||||
|
||||
{# arguments of the command #}
|
||||
{% if "arguments" in action_value %}
|
||||
{% for argument_name, argument_value in action_value["arguments"].items() %}
|
||||
.TP
|
||||
\fB{{ argument_name }}\fR{% if argument_value.get("full") %}, \fB{{ argument_value["full"] }}\fR{% endif %}\
|
||||
{% if str(argument_name).startswith("-") and not argument_value.get("action") == "store_true" %} \fI\,{{ (argument_value.get("full", argument_name)).lstrip("-") }}\fR {% if "default" in argument_value %}(default: {{ argument_value["default"] }}){% endif %}{% endif %}
|
||||
{{ argument_value.get("help", "")}}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Reference in a new issue