diff options
author | Lennart Poettering <lennart@poettering.net> | 2003-09-13 00:43:14 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2003-09-13 00:43:14 +0000 |
commit | 22daaf6b7fc3e12a0605a7bb31aba148ed5ba936 (patch) | |
tree | 2ec8fe89eecc744f519d108565b03855ca78df49 | |
parent | fb9d6daef0339b7a38ec35c0f7bbc0b5d937d413 (diff) |
XSL man pages
git-svn-id: file:///home/lennart/svn/public/ifplugd/trunk@41 2bf48fe7-cfc1-0310-909f-d9042e1e0fef
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | doc/NEWS | 2 | ||||
-rw-r--r-- | doc/README.html.in | 2 | ||||
-rw-r--r-- | man/Makefile.am | 32 | ||||
-rw-r--r-- | man/ifplugd.8.xml.in | 5 | ||||
-rw-r--r-- | man/ifplugd.conf.5.xml.in | 5 | ||||
-rw-r--r-- | man/ifstatus.8.xml.in | 7 | ||||
-rw-r--r-- | man/man.css | 30 | ||||
-rw-r--r-- | man/man.xsl | 120 |
9 files changed, 189 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am index 668868c..13d8694 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,15 +27,15 @@ README: $(MAKE) -C doc README ln -s doc/README README -homepage: +homepage: all dist test -d $$HOME/homepage/lennart mkdir -p $$HOME/homepage/lennart/projects/ifplugd cp *.tar.gz $$HOME/homepage/lennart/projects/ifplugd - cp doc/README.html doc/style.css doc/NEWS $$HOME/homepage/lennart/projects/ifplugd + cp man/ifplugd.8.xml man/ifstatus.8.xml man/ifplugd.conf.5.xml man/man.css man/man.xsl doc/README.html doc/style.css doc/NEWS $$HOME/homepage/lennart/projects/ifplugd cp $$HOME/homepage/lennart/projects/ifplugd/README.html $$HOME/homepage/lennart/projects/ifplugd/index.html distcleancheck: - @: + @: .PHONY: homepage distcleancheck @@ -1,4 +1,4 @@ -0.17 :: 13 Sep 2003 :: SVN +0.17 :: 13 Sep 2003 :: SVN 41 Init script update compativility fix for gcc 2.95 diff --git a/doc/README.html.in b/doc/README.html.in index f9f2784..90255b6 100644 --- a/doc/README.html.in +++ b/doc/README.html.in @@ -104,6 +104,8 @@ network is configured.</li> <h2><a name="documentation">Documentation</a></h2> +<p>Have a look on the man pages <a href="@PACKAGE_URL@ifplugd.8.xml"><tt>ifplugd(8)</tt></a>, <a href="@PACKAGE_URL@ifstatus.8.xml"><tt>ifstatus(8)</tt></a>, <a href="@PACKAGE_URL@ifplugd.conf.5.xml"><tt>ifplugd.conf(5)</tt></a>. (A XSLT capable browser is required)</p> + <h3>Configuration</h3> <p>Edit <tt>/etc/ifplugd/ifplugd.conf</tt> for configuration diff --git a/man/Makefile.am b/man/Makefile.am index 4674296..742e3bf 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -18,19 +18,33 @@ man_MANS = ifplugd.8 ifplugd.conf.5 ifstatus.8 -EXTRA_DIST = $(man_MANS) ifplugd.8.xml.in ifplugd.conf.5.xml.in ifstatus.8.xml.in +noinst_DATA = ifplugd.8.xml ifplugd.conf.5.xml ifstatus.8.xml -if USE_XMLTOMAN +EXTRA_DIST = $(man_MANS) ifplugd.8.xml.in ifplugd.conf.5.xml.in ifstatus.8.xml.in man.css man.xsl -CLEANFILES = $(man_MANS) +CLEANFILES = ifplugd.8.xml ifplugd.conf.5.xml ifstatus.8.xml -ifplugd.8: ifplugd.8.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' $< | xmltoman - > $@ +ifplugd.8.xml: ifplugd.8.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' $< > $@ -ifplugd.conf.5: ifplugd.conf.5.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' $< | xmltoman - > $@ +ifplugd.conf.5.xml: ifplugd.conf.5.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' $< > $@ -ifstatus.8: ifstatus.8.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' $< | xmltoman - > $@ +ifstatus.8.xml: ifstatus.8.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) + +ifplugd.8: ifplugd.8.xml Makefile + xmltoman $< > $@ + +ifplugd.conf.5: ifplugd.conf.5.xml Makefile + xmltoman $< > $@ + +ifstatus.8: ifstatus.8.xml Makefile + xmltoman $< > $@ + endif + diff --git a/man/ifplugd.8.xml.in b/man/ifplugd.8.xml.in index ed5dddd..d259608 100644 --- a/man/ifplugd.8.xml.in +++ b/man/ifplugd.8.xml.in @@ -1,7 +1,8 @@ <?xml version="1.0" standalone='no'?> -<!DOCTYPE spec SYSTEM "man.dtd"> +<!DOCTYPE manpage SYSTEM "man.dtd"> +<?xml-stylesheet type="text/xsl" href="man.xsl" ?> -<!-- $Id: ifplugd.8.xml 1.4 Sat, 01 Feb 2003 03:00:07 +0100 lennart $ --> +<!-- $Id$ --> <!-- This file is part of ifplugd. diff --git a/man/ifplugd.conf.5.xml.in b/man/ifplugd.conf.5.xml.in index ac25885..563a489 100644 --- a/man/ifplugd.conf.5.xml.in +++ b/man/ifplugd.conf.5.xml.in @@ -1,7 +1,8 @@ <?xml version="1.0" standalone='no'?> -<!DOCTYPE spec SYSTEM "man.dtd"> +<!DOCTYPE manpage SYSTEM "man.dtd"> +<?xml-stylesheet type="text/xsl" href="man.xsl" ?> -<!-- $Id: ifplugd.conf.5.xml 1.2 Wed, 23 Oct 2002 20:49:08 +0200 lennart $ --> +<!-- $Id$ --> <!-- This file is part of ifplugd. diff --git a/man/ifstatus.8.xml.in b/man/ifstatus.8.xml.in index 6de6433..61b246a 100644 --- a/man/ifstatus.8.xml.in +++ b/man/ifstatus.8.xml.in @@ -1,7 +1,8 @@ -<?xml version="1.0" standalone='no'?> -<!DOCTYPE spec SYSTEM "man.dtd"> +<?xml version="1.0"?> +<!DOCTYPE manpage SYSTEM "man.dtd"> +<?xml-stylesheet type="text/xsl" href="man.xsl" ?> -<!-- $Id: ifstatus.8.xml 1.3 Fri, 25 Oct 2002 21:12:38 +0200 lennart $ --> +<!-- $Id$ --> <!-- This file is part of ifplugd. diff --git a/man/man.css b/man/man.css new file mode 100644 index 0000000..0892e4f --- /dev/null +++ b/man/man.css @@ -0,0 +1,30 @@ +/* $Id$ */ + +/*** + 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/man.xsl b/man/man.xsl new file mode 100644 index 0000000..e633de1 --- /dev/null +++ b/man/man.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"> + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + </xsl:text> + <html> + + <head> + <title> + <xsl:value-of select="@name"/>(<xsl:value-of select="@section"/>) + </title> + <link rel="stylesheet" type="text/css" href="man.css"/> + </head> + <body> + <h1>Name</h1> + <p><xsl:value-of select="@name"/> + <xsl:if test="string-length(@desc) > 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) > 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> |