summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-08-06 13:11:18 +0000
committerLennart Poettering <lennart@poettering.net>2005-08-06 13:11:18 +0000
commit61eb92b1ba30fd4da9be7e9dc9714125c1576cca (patch)
treea413b6a7863f1f273650d40e15c491a079109d1c /man
parent0b5a3c8d2caf8a985c5bdd7965c36a0aeafb54aa (diff)
preliminary mn page work
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@247 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'man')
-rw-r--r--man/Makefile.am48
-rw-r--r--man/avahi-browse.1.xml.in127
-rw-r--r--man/xmltoman.css30
-rw-r--r--man/xmltoman.dtd39
-rw-r--r--man/xmltoman.xsl120
5 files changed, 364 insertions, 0 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..2d382ee
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,48 @@
+# $Id$
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+man_MANS = avahi-browse.1
+
+noinst_DATA = \
+ avahi-browse.1.xml
+
+EXTRA_DIST = \
+ $(man_MANS) \
+ avahi-browse.1.xml.in \
+ xmltoman.css \
+ xmltoman.xsl \
+ xmltoman.dtd
+
+CLEANFILES = \
+ $(noinst_DATA)
+
+avahi-browse.1.xml: avahi-browse.1.xml.in Makefile
+ sed -e 's,@sysconfdir\@,$(sysconfdir),g' \
+ -e 's,@sbindir\@,$(sbindir),g' \
+ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
+ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
+
+if USE_XMLTOMAN
+
+CLEANFILES += $(man_MANS)
+
+avahi-browse.1: avahi-browse.1.xml Makefile
+ xmltoman $< > $@
+
+endif
diff --git a/man/avahi-browse.1.xml.in b/man/avahi-browse.1.xml.in
new file mode 100644
index 0000000..e9fb2c2
--- /dev/null
+++ b/man/avahi-browse.1.xml.in
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
+<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
+
+<!-- $Id: ifplugstatus.8.xml.in 110 2004-05-10 21:32:00Z lennart $ -->
+
+<!--
+ This file is part of ifplugd.
+
+ ifplugd is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ ifplugd 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 General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with ifplugd; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+-->
+
+ <manpage name="ifplugstatus" section="8" desc="A link beat detection tool">
+
+ <synopsis>
+ <cmd>ifplugstatus [<arg>options</arg>] [<arg>INTERFACE</arg>]</cmd>
+ </synopsis>
+
+ <description>
+ <p>ifplugstatus is an utility which may be used to detect the link
+ status of a local Linux ethernet device, much in the same way
+ mii-diag, mii-tool and ethtool work. In fact it supports all
+ three different APIs these three tools use. In addition it supports
+ link checking with the IFF_RUNNING interface flag, which most modern
+ drivers (not only ethernet) support, and association status checking
+ with the wireless extension API for WLAN devices.</p>
+
+ <p>The APIs are tried in the following order:</p>
+
+ <p>First the newest API: <arg>SIOCETHTOOL</arg> (aka ethtool API)</p>
+ <p>Second the next older API: <arg>SIOCGMIIREG</arg> (aka mii-diag API)</p>
+ <p>Than the WLAN API: <arg>wireless extension</arg> (aka iwconfig API)</p>
+ <p>Followed by the cleanest API: <arg>IFF_RUNNING</arg> (aka ifconfig API)</p>
+
+ <p>The oldest API (<arg>SIOCPRIV</arg> aka mii-tool API) is not tested since it is obsolete.</p>
+
+ <p>ifplugstatus may be used in shell script since it returns the
+ current status as return value. It is especially useful to
+ detect the available APIs on the used network driver. (Option
+ <opt>-v</opt>)</p>
+ </description>
+
+ <options>
+
+ <p>You may specify an ethernet device on the command
+ line. Otherwise ifplugstatus will check all available network interfaces.</p>
+
+ <option>
+ <p><opt>-a | --auto</opt></p>
+ <optdesc><p>
+ Enable interface automatically before querying (default: off)
+ </p></optdesc>
+ </option>
+
+
+ <option>
+ <p><opt>-h | --help</opt></p>
+ <optdesc><p>
+ Show help
+ </p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>-q | --quiet</opt></p> <optdesc><p>Decrease verbosity
+ by one. If the verbosity is &lt; 0, no text will be shown,
+ only the return value is relevant; if the verbosity is = 0, a
+ terse status will be shown; If the verbosity is &gt; 0,
+ detailed information about the used API is returned. (By
+ default the verbosity is 0)</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>-v | --verbose</opt></p>
+ <optdesc><p>
+ Increase verbosity by one. See option <opt>-q</opt>.
+ </p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>-V | --version</opt></p>
+ <optdesc><p>
+ Show version
+ </p></optdesc>
+ </option>
+
+ </options>
+
+ <section name="Return values">
+ <p><arg>0</arg> Success</p>
+ <p><arg>1</arg> Failure</p>
+ <p><arg>2</arg> Link beat detected (only available when an interface is specified)</p>
+ <p><arg>3</arg> Unplugged (same here)</p>
+ </section>
+
+ <section name="Author">
+ <p>ifplugd was written by Lennart Poettering
+ &lt;@PACKAGE_BUGREPORT@&gt;. ifplugd is available
+ at <url
+ href="@PACKAGE_URL@"/>
+ </p>
+ </section>
+
+ <section name="See also">
+ <p>
+ <manref name="mii-diag" section="8"/>, <manref name="mii-tool"
+ section="8"/>, <manref name="ethtool" section="8"/>, <manref name="ifplugd" section="8"/>
+ </p>
+ </section>
+
+ <section name="Comments">
+ <p>This man page was written using <manref name="xml2man" section="1"
+ href="http://masqmail.cx/xml2man/"/> by Oliver Kurth.</p>
+ </section>
+
+ </manpage>
diff --git a/man/xmltoman.css b/man/xmltoman.css
new file mode 100644
index 0000000..caab604
--- /dev/null
+++ b/man/xmltoman.css
@@ -0,0 +1,30 @@
+/* $Id: xmltoman.css 52 2003-10-17 00:09:23Z lennart $ */
+
+/***
+ This file is part of ifplugd.
+
+ ifplugd is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ ifplugd 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 General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with ifplugd; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+***/
+
+body { color: black; background-color: white; margin: 0.5cm; }
+a:link, a:visited { color: #900000; }
+h1 { text-transform:uppercase; font-size: 18pt; color: #00009F; }
+p { margin-left:1cm; margin-right:1cm; }
+.cmd { font-family:monospace; }
+.file { font-family:monospace; }
+.arg { text-transform:uppercase; font-family:monospace; font-style: italic; }
+.opt { font-family:monospace; font-weight: bold; }
+.manref { font-family:monospace; }
+.option .optdesc { margin-left:2cm; }
diff --git a/man/xmltoman.dtd b/man/xmltoman.dtd
new file mode 100644
index 0000000..42809db
--- /dev/null
+++ b/man/xmltoman.dtd
@@ -0,0 +1,39 @@
+<!-- $Id: xmltoman.dtd 60 2003-10-20 22:05:22Z lennart $ -->
+
+<!--
+ This file is part of ifplugd.
+
+ ifplugd is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ ifplugd 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 General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with ifplugd; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+-->
+
+<!ELEMENT manpage (synopsis | description | section | options | seealso)*>
+<!ATTLIST manpage name CDATA #REQUIRED section CDATA #REQUIRED desc CDATA #IMPLIED>
+<!ELEMENT arg (#PCDATA)>
+<!ELEMENT p (#PCDATA | arg | url | manref | opt | file )*>
+<!ELEMENT synopsis (cmd | p)+>
+<!ELEMENT description (p)+>
+<!ELEMENT section (p | option)*>
+<!ATTLIST section name CDATA #REQUIRED>
+<!ELEMENT option (#PCDATA | p | optdesc)*>
+<!ELEMENT optdesc (#PCDATA | p )*>
+<!ELEMENT cmd (#PCDATA | arg)*>
+<!ELEMENT options (p | option)*>
+<!ELEMENT seealso (p)*>
+<!ELEMENT opt (#PCDATA)>
+<!ELEMENT file (#PCDATA)>
+<!ELEMENT manref EMPTY>
+<!ATTLIST manref name CDATA #REQUIRED section CDATA #REQUIRED href CDATA #IMPLIED>
+<!ELEMENT url EMPTY>
+<!ATTLIST url href CDATA #REQUIRED>
diff --git a/man/xmltoman.xsl b/man/xmltoman.xsl
new file mode 100644
index 0000000..2048708
--- /dev/null
+++ b/man/xmltoman.xsl
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
+
+<!--
+ This file is part of ifplugd.
+
+ ifplugd is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ ifplugd 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 General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with ifplugd; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+-->
+
+<xsl:template match="/manpage">
+ <xsl:text disable-output-escaping="yes">
+ &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
+ </xsl:text>
+ <html>
+
+ <head>
+ <title>
+ <xsl:value-of select="@name"/>(<xsl:value-of select="@section"/>)
+ </title>
+ <link rel="stylesheet" type="text/css" href="xmltoman.css"/>
+ </head>
+ <body>
+ <h1>Name</h1>
+ <p><xsl:value-of select="@name"/>
+ <xsl:if test="string-length(@desc) &gt; 0">
+ - <xsl:value-of select="@desc"/>
+ </xsl:if>
+ </p>
+ <xsl:apply-templates />
+ </body>
+ </html>
+</xsl:template>
+
+<xsl:template match="p">
+ <p>
+ <xsl:apply-templates/>
+ </p>
+</xsl:template>
+
+<xsl:template match="cmd">
+ <p class="cmd">
+ <xsl:apply-templates/>
+ </p>
+</xsl:template>
+
+<xsl:template match="arg">
+ <span class="arg"><xsl:apply-templates/></span>
+</xsl:template>
+
+<xsl:template match="opt">
+ <span class="opt"><xsl:apply-templates/></span>
+</xsl:template>
+
+<xsl:template match="file">
+ <span class="file"><xsl:apply-templates/></span>
+</xsl:template>
+
+<xsl:template match="optdesc">
+ <div class="optdesc">
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="synopsis">
+ <h1>Synopsis</h1>
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="seealso">
+ <h1>Synopsis</h1>
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="description">
+ <h1>Description</h1>
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="options">
+ <h1>Options</h1>
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="section">
+ <h1><xsl:value-of select="@name"/></h1>
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="option">
+ <div class="option"><xsl:apply-templates/></div>
+</xsl:template>
+
+<xsl:template match="manref">
+ <xsl:choose>
+ <xsl:when test="string-length(@href) &gt; 0">
+ <a class="manref"><xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute><xsl:value-of select="@name"/>(<xsl:value-of select="@section"/>)</a>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="manref"><xsl:value-of select="@name"/>(<xsl:value-of select="@section"/>)</span>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="url">
+ <a class="url"><xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute><xsl:value-of select="@href"/></a>
+</xsl:template>
+
+</xsl:stylesheet>