docs: don't generate <description> tag in "gen-metadata-nm-settings-nmcli"

"gen-metadata-nm-settings-nmcli" previously printed the <description>.
But that tag is not very useful for further processing.

For the most part it itself comes from "src/libnmc-setting/settings-docs.h",
which is generated (but lost formatting information already to be
suitable for where it's used).

Some parts are original texts from "src/libnmc-setting/nm-meta-setting-desc.c",
like TEAM_DESCRIBE_MESSAGE. However those text are also not really suitable
for any other purpose.

Rename the tag, so that the tools that process "gen-metadata-nm-settings-nmcli.xml"
don't use it.

The file "gen-metadata-nm-settings-nmcli.xml" is currently only used to
generate "man/nm-settings-docs-nmcli.xml", and that file slightly
changes with this patch. However, the manual page which is generated by
"man/nm-settings-docs-nmcli.xml" does not change.
This commit is contained in:
Thomas Haller 2023-05-17 11:46:09 +02:00
parent d95001beff
commit 63cc5b3104
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 460 additions and 448 deletions

View file

@ -57,10 +57,22 @@ main(int argc, char *argv[])
g_print("\n%salias=%s",
_indent_level(2 * INDENT + 10),
tmp3 = _xml_escape_attribute(prop_info->property_alias));
if (prop_info->describe_doc)
g_print("\n%sdescription=%s",
if (prop_info->describe_doc) {
/* These descriptions are used by interactive nmcli modes. For the most part,
* they are themselves generated (see "settings-docs.h"). Some of them are instead
* explicitly (manually) set.
*
* In any case, they serve little purpose outside of nmcli's interactive mode,
* because their formatting/wording would not be suitable.
*
* We generate this XML mainly to generate `man nm-settings-nmcli`, but the
* descriptions in "describe_doc" field are not suitable there.
*
* Name them something else ("<nmcli-description>") which isn't actually used. */
g_print("\n%snmcli-description=%s",
_indent_level(2 * INDENT + 10),
tmp4 = _xml_escape_attribute(prop_info->describe_doc));
}
g_print(" />\n");
}

File diff suppressed because it is too large Load diff