]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
make-directive-index: allow variablelist to specify an element to index
authorJérémy Rosen <jeremy.rosen@smile.fr>
Sat, 18 Apr 2020 17:48:13 +0000 (19:48 +0200)
committerJérémy Rosen <jeremy.rosen@smile.fr>
Mon, 20 Apr 2020 16:49:58 +0000 (18:49 +0200)
This commit looks for a new "extra-ref" attribute in <variablelist>
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

index 659c6275f5f5a274c643b4cc26a7cabb0da0c7f0..0333a92a1d92d6f0df3bbb0ad1d4f3f45e2a6cd0 100755 (executable)
@@ -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),