diff --git a/man/nm-settings-nmcli.xsl b/man/nm-settings-nmcli.xsl
index a31922a57..5a6b8ba18 100644
--- a/man/nm-settings-nmcli.xsl
+++ b/man/nm-settings-nmcli.xsl
@@ -150,12 +150,19 @@
Alias:
-
-
-
- See for flag values.
-
-
+
+
+
+
+
+
+
+
+ See for flag values.
+
+
+
+
Format:
diff --git a/tools/generate-docs-nm-property-infos.py b/tools/generate-docs-nm-property-infos.py
index 238469c66..74e88d6ad 100755
--- a/tools/generate-docs-nm-property-infos.py
+++ b/tools/generate-docs-nm-property-infos.py
@@ -66,6 +66,7 @@ def process_data(data):
"default",
"example",
"description",
+ "description-docbook",
]
kwd_pat = "|".join(keywords)
keyword = ""
@@ -76,14 +77,20 @@ def process_data(data):
kwd_more_line_found = re.search(r"^\s*\**\s+(.*?)\s*$", line)
if kwd_first_line_found:
keyword = kwd_first_line_found.group(1)
- value = kwd_first_line_found.group(2) + " "
+ if keyword == "description-docbook":
+ value = kwd_first_line_found.group(2) + "\n"
+ else:
+ value = kwd_first_line_found.group(2) + " "
parsed_data[keyword] = value
elif kwd_more_line_found:
if not keyword:
print("Extra mess in a comment: %s" % (line))
exit(1)
else:
- value = kwd_more_line_found.group(1) + " "
+ if keyword == "description-docbook":
+ value = kwd_more_line_found.group(1) + "\n"
+ else:
+ value = kwd_more_line_found.group(1) + " "
parsed_data[keyword] += value
for keyword in keywords:
if keyword == "variable" and keyword not in parsed_data:
@@ -104,6 +111,13 @@ def write_data(setting_node, parsed_data):
property_node.set("default", parsed_data["default"])
property_node.set("example", parsed_data["example"])
property_node.set("description", parsed_data["description"])
+ if parsed_data["description-docbook"]:
+ des = ET.fromstring(
+ ""
+ + parsed_data["description-docbook"]
+ + ""
+ )
+ property_node.append(des)
def pretty_xml(element, newline, level=0):
diff --git a/tools/generate-docs-nm-settings-docs-merge.py b/tools/generate-docs-nm-settings-docs-merge.py
index 33c8eff0d..0f0f181bd 100755
--- a/tools/generate-docs-nm-settings-docs-merge.py
+++ b/tools/generate-docs-nm-settings-docs-merge.py
@@ -111,6 +111,13 @@ def node_set_attr(dst_node, name, nodes):
dst_node.set(name, x)
+def find_first_not_none(itr):
+ for i in itr:
+ if i is not None:
+ return i
+ return None
+
+
###############################################################################
gl_only_from_first = False
@@ -173,6 +180,11 @@ for setting_name in iter_keys_of_dicts(settings_roots, key_fcn_setting_name):
dbg("> > > > property_name: %s" % (property_name))
properties_attrs = list([p.get(property_name) for p in properties])
+ description_docbook = find_first_not_none(
+ p_attr.find("description-docbook")
+ for p_attr in properties_attrs
+ if p_attr is not None
+ )
if gl_only_from_first and properties_attrs[0] is None:
dbg("> > > > skip (only-from-first")
@@ -193,5 +205,8 @@ for setting_name in iter_keys_of_dicts(settings_roots, key_fcn_setting_name):
node_set_attr(property_node, "default", properties_attrs)
node_set_attr(property_node, "description", properties_attrs)
node_set_attr(property_node, "alias", properties_attrs)
+ if description_docbook is not None:
+ property_node.insert(0, description_docbook)
+
ET.ElementTree(root_node).write(gl_output_xml_file)