diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-05-07 14:59:24 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-05-07 14:59:24 +0200 |
commit | 0d525a3e9366f744edeb327fec94928305b27cc4 (patch) | |
tree | 38dbc61cab8aa02e15f4e90ebf7a30b4b1a22fcf /tools | |
parent | 282230882cd0fc49b5377349f2aee22a1c9dd159 (diff) | |
download | systemd-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')
-rwxr-xr-x | tools/make-directive-index.py | 9 |
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()): |