chiark / gitweb /
Also drop <authorgroup> from autogenerated pages
[elogind.git] / tools / make-directive-index.py
index 2ff304fddc1ca14f743c58409b1d6d24f5ae5779..ef407324d6602fcff4e5274979f3b71e347c9867 100755 (executable)
@@ -1,52 +1,30 @@
+#!/usr/bin/env python3
 #  -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
+# SPDX-License-Identifier: LGPL-2.1+
 #
-#  This file is part of systemd.
-#
-#  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
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-#
-#  systemd is distributed in the hope that it will be useful, but
-#  WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#  Lesser General Public License for more details.
-#
-#  You should have received a copy of the GNU Lesser General Public License
-#  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+#  Copyright © 2012-2013 Zbigniew Jędrzejewski-Szmek
 
 import sys
 import collections
 import re
-from xml_helper import *
+from xml_helper import xml_parse, xml_print, tree
 from copy import deepcopy
 
 TEMPLATE = '''\
-<refentry id="systemd.directives" conditional="HAVE_PYTHON">
+<refentry id="elogind.directives" conditional="HAVE_PYTHON">
 
         <refentryinfo>
-                <title>systemd.directives</title>
-                <productname>systemd</productname>
-
-                <authorgroup>
-                        <author>
-                                <contrib>Developer</contrib>
-                                <firstname>Zbigniew</firstname>
-                                <surname>Jędrzejewski-Szmek</surname>
-                                <email>zbyszek@in.waw.pl</email>
-                        </author>
-                </authorgroup>
+                <title>elogind.directives</title>
+                <productname>elogind</productname>
         </refentryinfo>
 
         <refmeta>
-                <refentrytitle>systemd.directives</refentrytitle>
+                <refentrytitle>elogind.directives</refentrytitle>
                 <manvolnum>7</manvolnum>
         </refmeta>
 
         <refnamediv>
-                <refname>systemd.directives</refname>
+                <refname>elogind.directives</refname>
                 <refpurpose>Index of configuration directives</refpurpose>
         </refnamediv>
 
@@ -63,7 +41,7 @@ TEMPLATE = '''\
                 <title>Options on the kernel command line</title>
 
                 <para>Kernel boot options for configuring the behaviour of the
-                systemd process.</para>
+                elogind process.</para>
 
                 <variablelist id='kernel-commandline-options' />
         </refsect1>
@@ -71,7 +49,7 @@ TEMPLATE = '''\
         <refsect1>
                 <title>Environment variables</title>
 
-                <para>Environment variables understood by the systemd
+                <para>Environment variables understood by the elogind
                 manager and other programs.</para>
 
                 <variablelist id='environment-variables' />
@@ -80,7 +58,7 @@ TEMPLATE = '''\
         <refsect1>
                 <title>UDEV directives</title>
 
-                <para>Directives for configuring systemd units through the
+                <para>Directives for configuring elogind units through the
                 udev database.</para>
 
                 <variablelist id='udev-directives' />
@@ -91,7 +69,7 @@ TEMPLATE = '''\
 
                 <para>Directives for configuring network links through the
                 net-setup-link udev builtin and networks through
-                systemd-networkd.</para>
+                elogind-networkd.</para>
 
                 <variablelist id='network-directives' />
         </refsect1>
@@ -113,37 +91,29 @@ TEMPLATE = '''\
         </refsect1>
 
         <refsect1>
-                <title>crypttab options</title>
+                <title><filename>/etc/crypttab</filename> and
+                <filename>/etc/fstab</filename> options</title>
 
                 <para>Options which influence mounted filesystems and
                 encrypted volumes.</para>
 
-                <variablelist id='crypttab-options' />
+                <variablelist id='fstab-options' />
         </refsect1>
 
         <refsect1>
                 <title>System manager directives</title>
 
                 <para>Directives for configuring the behaviour of the
-                systemd process.</para>
-
-                <variablelist id='systemd-directives' />
-        </refsect1>
-
-        <refsect1>
-                <title>bootchart.conf directives</title>
-
-                <para>Directives for configuring the behaviour of the
-                systemd-bootchart process.</para>
+                elogind process.</para>
 
-                <variablelist id='bootchart-directives' />
+                <variablelist id='elogind-directives' />
         </refsect1>
 
         <refsect1>
-                <title>command-line options</title>
+                <title>command line options</title>
 
                 <para>Command-line options accepted by programs in the
-                systemd suite.</para>
+                elogind suite.</para>
 
                 <variablelist id='options' />
         </refsect1>
@@ -151,7 +121,7 @@ TEMPLATE = '''\
         <refsect1>
                 <title>Constants</title>
 
-                <para>Various constant used and/or defined by systemd.</para>
+                <para>Various constant used and/or defined by elogind.</para>
 
                 <variablelist id='constants' />
         </refsect1>
@@ -267,6 +237,7 @@ def _make_section(template, name, directives, formatting):
             b = tree.SubElement(para, 'citerefentry')
             c = tree.SubElement(b, 'refentrytitle')
             c.text = manpage
+            c.attrib['target'] = varname
             d = tree.SubElement(b, 'manvolnum')
             d.text = manvolume
         entry.tail = '\n\n'