X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=make-directive-index.py;h=ab40997a98bb928cfc463ac4becb893e07289b2a;hb=3251c0d2392062b2b8354793a2037d1161f824ee;hp=eaf7019a2b343efdcbb1d86ebc61300a604ac3fd;hpb=f274ece0f76b5709408821e317e87aef76123db6;p=elogind.git
diff --git a/make-directive-index.py b/make-directive-index.py
index eaf7019a2..ab40997a9 100755
--- a/make-directive-index.py
+++ b/make-directive-index.py
@@ -2,7 +2,7 @@
#
# This file is part of systemd.
#
-# Copyright 2012 Zbigniew JÄdrzejewski-Szmek
+# Copyright 2012-2013 Zbigniew JÄdrzejewski-Szmek
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
@@ -20,6 +20,7 @@
import sys
import collections
import xml.etree.ElementTree as tree
+import re
TEMPLATE = '''\
@@ -40,7 +41,7 @@ TEMPLATE = '''\
systemd.directives
- 5
+ 7
@@ -58,12 +59,21 @@ TEMPLATE = '''\
- System manager directives
+ Options on the kernel command line
- Directives for configuring the behaviour of the
+ Kernel boot options for configuring the behaviour of the
systemd process.
-
+
+
+
+
+ Environment variables
+
+ Environment variables understood by the systemd
+ manager and other programs.
+
+
@@ -76,37 +86,110 @@ TEMPLATE = '''\
- Journal directives
+ Journal fields
- Directives for configuring the behaviour of the
- journald process.
+ Fields in the journal events with a well known meaning.
+
+
+ PAM configuration directives
+
+ Directives for configuring PAM behaviour.
+
+
+
+
+
+ crypttab options
+
+ Options which influence mounted filesystems and
+ encrypted volumes.
+
+
+
+
+
+ System manager directives
+
+ Directives for configuring the behaviour of the
+ systemd process.
+
+
+
+
+
+ bootchart.conf directives
+
+ Directives for configuring the behaviour of the
+ systemd-bootchart process.
+
+
+
+
+
+ command-line options
+
+ Command-line options accepted by programs in the
+ systemd suite.
+
+
+
+
+
+ Miscellaneous options and directives
+
+ Other configuration elements which don't fit in
+ any of the above groups.
+
+
+
+
+
+ Colophon
+
+
'''
-def _extract_directives(directive_groups, page):
+COLOPHON = '''\
+This index contains {count} entries in {sections} sections,
+referring to {pages} individual manual pages.
+'''
+
+def _extract_directives(directive_groups, formatting, page):
t = tree.parse(page)
section = t.find('./refmeta/manvolnum').text
pagename = t.find('./refmeta/refentrytitle').text
for variablelist in t.iterfind('.//variablelist'):
- klass = variablelist.attrib.get('class') or 'unit-directives'
- stor = directive_groups[klass]
- for varname in variablelist.iterfind('./varlistentry/term/varname'):
- text = ''.join(varname.text.partition('=')[:2])
- stor[text].append((pagename, section))
-
-def _make_section(refentry, name, directives):
- varlist = refentry.find(".//*[@id='{}']".format(name))
+ klass = variablelist.attrib.get('class')
+ storvar = directive_groups[klass or 'miscellaneous']
+ storopt = directive_groups['options']
+ #