X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=make-directive-index.py;h=b06a54c1d50a85286006e4d10c6487f4681c268f;hp=3bf672e1a6b19704cdcdc956382d9836399d16e4;hb=cdf3f17bfb20eac2929c8b6a582b988b790f071d;hpb=0acfdd61edb96585c6438698bcc21e366acd4291 diff --git a/make-directive-index.py b/make-directive-index.py index 3bf672e1a..b06a54c1d 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,9 +20,10 @@ import sys import collections import xml.etree.ElementTree as tree +import re TEMPLATE = '''\ - + systemd.directives @@ -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,14 +86,39 @@ 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 @@ -93,6 +128,24 @@ TEMPLATE = '''\ + + 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 @@ -105,27 +158,38 @@ This index contains {count} entries in {sections} sections, referring to {pages} individual manual pages. ''' -def _extract_directives(directive_groups, page): +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(template, name, directives): + klass = variablelist.attrib.get('class') + storvar = directive_groups[klass or 'miscellaneous'] + storopt = directive_groups['options'] + #