X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=make-directive-index.py;h=039efaa4345001fe4f22fa16c07c3fcc55ae632b;hb=8f27a2212ee8d6311c88ef4358953ad0d7bfa851;hp=b06a54c1d50a85286006e4d10c6487f4681c268f;hpb=56ba3c78ae35065064c4289a0c8e22a81256af20;p=elogind.git
diff --git a/make-directive-index.py b/make-directive-index.py
index b06a54c1d..039efaa43 100755
--- a/make-directive-index.py
+++ b/make-directive-index.py
@@ -19,7 +19,12 @@
import sys
import collections
-import xml.etree.ElementTree as tree
+try:
+ from lxml import etree as tree
+ PRETTY = dict(pretty_print=True)
+except ImportError:
+ import xml.etree.ElementTree as tree
+ PRETTY = {}
import re
TEMPLATE = '''\
@@ -146,6 +151,15 @@ TEMPLATE = '''\
+
+ Files and directories
+
+ Paths and file names referred to in the
+ documentation.
+
+
+
+
Colophon
@@ -162,10 +176,11 @@ def _extract_directives(directive_groups, formatting, page):
t = tree.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']
#