X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=make-directive-index.py;h=b43fea0b99e386936da6d32be21c6877504295d9;hp=b06a54c1d50a85286006e4d10c6487f4681c268f;hb=3716e8c99c25e7f65d7eff3a131cc459f66ec4eb;hpb=56ba3c78ae35065064c4289a0c8e22a81256af20 diff --git a/make-directive-index.py b/make-directive-index.py index b06a54c1d..b43fea0b9 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 = '''\ @@ -137,6 +138,14 @@ TEMPLATE = '''\ + + Constants + + Various constant used and/or defined by systemd. + + + + Miscellaneous options and directives @@ -146,6 +155,15 @@ TEMPLATE = '''\ + + Files and directories + + Paths and file names referred to in the + documentation. + + + + Colophon @@ -159,13 +177,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'] #