From 785a51eb682136b2c7ee33fabe64c72d20fa37db Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 26 Jun 2013 19:48:19 -0400 Subject: [PATCH] man: add CONSTANTS section to systemd.directives(7) --- make-directive-index.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/make-directive-index.py b/make-directive-index.py index 468d14da7..b43fea0b9 100755 --- a/make-directive-index.py +++ b/make-directive-index.py @@ -138,6 +138,14 @@ TEMPLATE = '''\ + + Constants + + Various constant used and/or defined by systemd. + + + + Miscellaneous options and directives @@ -222,6 +230,16 @@ def _extract_directives(directive_groups, formatting, page): storfile[text].append((pagename, section)) formatting[text] = name + storfile = directive_groups['constants'] + for name in t.iterfind('.//constant'): + if name.attrib.get('noindex'): + continue + name.tail = '' + if name.text.startswith('('): # a cast, strip it + name.text = name.text.partition(' ')[2] + 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()): -- 2.30.2