From 8906e262784bcb3989c6103803834ed35f6214d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= Date: Sat, 18 Apr 2020 19:48:13 +0200 Subject: make-directive-index: allow variablelist to specify an element to index This commit looks for a new "extra-ref" attribute in If this attribute is specified, its content will be index as pointing to the current man-page in systemd.directives --- tools/make-directive-index.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/make-directive-index.py') diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py index 659c6275f5..0333a92a1d 100755 --- a/tools/make-directive-index.py +++ b/tools/make-directive-index.py @@ -200,6 +200,13 @@ def _extract_directives(directive_groups, formatting, page): name.tail = '' name.text = text formatting[text] = name + extra = variablelist.attrib.get('extra-ref') + if extra: + stor[extra].append((pagename, section)) + if extra not in formatting: + elt = tree.Element("varname") + elt.text= extra + formatting[extra] = elt storfile = directive_groups['filenames'] for xpath, absolute_only in (('.//refsynopsisdiv//filename', False), -- cgit v1.2.1