]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: put all pages which mention a specifier in the index
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 7 May 2020 13:05:29 +0000 (15:05 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 7 May 2020 14:30:10 +0000 (16:30 +0200)
I wasn't 100% convinced that this is the right thing to do, hence the separate
commit. But e.g. for paths we index all mentions, so I think it's reasonable to
do the same here.

man/systemd.mount.xml
man/systemd.swap.xml
tools/make-directive-index.py

index d775d74053fdf14180a05453f3d8381ce8e6c7b8..4200a9ed7ebe08e3848508d38663415819f267e3 100644 (file)
         created. (See
         <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
         for more information.) This option is mandatory. Note that the usual specifier expansion is applied
-        to this setting, literal percent characters should hence be written as <literal>%%</literal>. If this
-        mount is a bind mount and the specified path does not exist yet it is created as
-        directory.</para></listitem>
+        to this setting, literal percent characters should hence be written as <literal
+        class='specifiers'>%%</literal>. If this mount is a bind mount and the specified path does not exist
+        yet it is created as directory.</para></listitem>
       </varlistentry>
 
       <varlistentry>
 
         <listitem><para>Mount options to use when mounting. This takes a comma-separated list of options. This setting
         is optional. Note that the usual specifier expansion is applied to this setting, literal percent characters
-        should hence be written as <literal>%%</literal>.</para></listitem>
+        should hence be written as <literal class='specifiers'>%%</literal>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
index 190fc388c0911a5d64a7520ba9d5e659553ad5ad..c4160290a5142787f38c00cf9c95c7a0fa0d8efc 100644 (file)
         project='man-pages'><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry> for
         details. If this refers to a device node, a dependency on the respective device unit is automatically
         created. (See
-        <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more
-        information.) If this refers to a file, a dependency on the respective mount unit is automatically
-        created. (See <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-        for more information.) This option is mandatory. Note that the usual specifier expansion is applied to this
-        setting, literal percent characters should hence be written as <literal>%%</literal>.</para></listitem>
+        <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+        for more information.) If this refers to a file, a dependency on the respective mount unit is
+        automatically created. (See
+        <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
+        more information.) This option is mandatory. Note that the usual specifier expansion is applied to
+        this setting, literal percent characters should hence be written as
+        <literal class='specifiers'>%%</literal>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
index c6b2173b2e9908a6dd1a90017d96ddc291ae6bee..b04281490d6089ee4726ca6af5397f21659ffd4c 100755 (executable)
@@ -95,6 +95,9 @@ def _extract_directives(directive_groups, formatting, page):
             continue
         storfile[name.text].append((pagename, section))
         formatting[name.text] = name
+    for name in t.iterfind(".//literal[@class='specifiers']"):
+        storfile[name.text].append((pagename, section))
+        formatting[name.text] = name
 
 def _make_section(template, name, directives, formatting):
     varlist = template.find(".//*[@id='{}']".format(name))