generate-docs-nm-settings-docs-merge: merge <deprecated*> elements

They will be used to include property deprecation data.
This commit is contained in:
Lubomir Rintel
2022-09-06 17:58:43 +02:00
parent 6ce2aae011
commit d71f0aac39

View File

@@ -181,6 +181,8 @@ for setting_name in iter_keys_of_dicts(settings_roots, key_fcn_setting_name):
properties_attrs = list([p.get(property_name) for p in properties])
description_docbook = find_attr(properties_attrs, "description-docbook")
description = find_attr(properties_attrs, "description")
deprecated_docbook = find_attr(properties_attrs, "deprecated-docbook")
deprecated = find_attr(properties_attrs, "deprecated")
if gl_only_from_first and properties_attrs[0] is None:
dbg("> > > > skip (only-from-first")
@@ -211,4 +213,9 @@ for setting_name in iter_keys_of_dicts(settings_roots, key_fcn_setting_name):
elif description is not None:
property_node.append(description)
if deprecated_docbook is not None:
property_node.insert(0, deprecated_docbook)
if deprecated is not None:
property_node.insert(0, deprecated)
ET.ElementTree(root_node).write(gl_output_xml_file)