summaryrefslogtreecommitdiff
path: root/tools/make-directive-index.py
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-07 14:59:24 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-07 14:59:24 +0200
commit0d525a3e9366f744edeb327fec94928305b27cc4 (patch)
tree38dbc61cab8aa02e15f4e90ebf7a30b4b1a22fcf /tools/make-directive-index.py
parent282230882cd0fc49b5377349f2aee22a1c9dd159 (diff)
downloadsystemd-0d525a3e9366f744edeb327fec94928305b27cc4.tar.gz
man: add specifiers section to directives index
The hack with getparent().txt is not very pretty, but the whole thing seems to work well enough. It is useful to figure out whihc specifiers are supported where.
Diffstat (limited to 'tools/make-directive-index.py')
-rwxr-xr-xtools/make-directive-index.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py
index 26561a2456..c6b2173b2e 100755
--- a/tools/make-directive-index.py
+++ b/tools/make-directive-index.py
@@ -87,6 +87,15 @@ def _extract_directives(directive_groups, formatting, page):
storfile[name.text].append((pagename, section))
formatting[name.text] = name
+ storfile = directive_groups['specifiers']
+ for name in t.iterfind(".//table[@class='specifiers']//entry/literal"):
+ if name.text[0] != '%' or name.getparent().text is not None:
+ continue
+ if name.attrib.get('index') == 'false':
+ continue
+ storfile[name.text].append((pagename, section))
+ formatting[name.text] = name
+
def _make_section(template, name, directives, formatting):
varlist = template.find(".//*[@id='{}']".format(name))
for varname, manpages in sorted(directives.items()):