X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=make-directive-index.py;h=2ff304fddc1ca14f743c58409b1d6d24f5ae5779;hp=b06a54c1d50a85286006e4d10c6487f4681c268f;hb=69727e6dc69ae5d9b5ae3681723778a3faa354e9;hpb=56ba3c78ae35065064c4289a0c8e22a81256af20 diff --git a/make-directive-index.py b/make-directive-index.py index b06a54c1d..2ff304fdd 100755 --- a/make-directive-index.py +++ b/make-directive-index.py @@ -19,8 +19,9 @@ import sys import collections -import xml.etree.ElementTree as tree import re +from xml_helper import * +from copy import deepcopy TEMPLATE = '''\ @@ -85,6 +86,16 @@ TEMPLATE = '''\ + + Network directives + + Directives for configuring network links through the + net-setup-link udev builtin and networks through + systemd-networkd. + + + + Journal fields @@ -137,6 +148,14 @@ TEMPLATE = '''\ + + Constants + + Various constant used and/or defined by systemd. + + + + Miscellaneous options and directives @@ -146,6 +165,15 @@ TEMPLATE = '''\ + + Files and directories + + Paths and file names referred to in the + documentation. + + + + Colophon @@ -159,13 +187,14 @@ referring to {pages} individual manual pages. ''' def _extract_directives(directive_groups, formatting, page): - t = tree.parse(page) + t = xml_parse(page) section = t.find('./refmeta/manvolnum').text pagename = t.find('./refmeta/refentrytitle').text + + storopt = directive_groups['options'] for variablelist in t.iterfind('.//variablelist'): klass = variablelist.attrib.get('class') storvar = directive_groups[klass or 'miscellaneous'] - storopt = directive_groups['options'] #