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=29c594cb750183b5ed6db9fc0d71f6b0f52f0c8c;hb=753e98788a9bcbd3bba2b3006672c003ae72eefa;hpb=ccc9a4f9ffdab069b0b785627c48962fdadf6d46 diff --git a/make-directive-index.py b/make-directive-index.py index 29c594cb7..2ff304fdd 100755 --- a/make-directive-index.py +++ b/make-directive-index.py @@ -19,11 +19,12 @@ import sys import collections -import xml.etree.ElementTree as tree import re +from xml_helper import * +from copy import deepcopy TEMPLATE = '''\ - + systemd.directives @@ -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 @@ -158,14 +186,15 @@ This index contains {count} entries in {sections} sections, referring to {pages} individual manual pages. ''' -def _extract_directives(directive_groups, page): - t = tree.parse(page) +def _extract_directives(directive_groups, formatting, 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'] #