diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-01-14 22:45:22 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-01-14 22:45:22 +0000 |
commit | dcc8faf7a28745d566f662969c09e9c41ebd0408 (patch) | |
tree | 6e24b0baca370a77d3ab134be903b34b18e0b040 /man | |
parent | 2187fc7c62ffad7cb514d061899d57cfd95438dc (diff) |
add man page
git-svn-id: file:///home/lennart/svn/public/bidilink/trunk@8 9cde1c1d-e4d0-0310-8a68-bf217395ea82
Diffstat (limited to 'man')
-rw-r--r-- | man/Makefile.am | 37 | ||||
-rw-r--r-- | man/bidilink.1.xml.in | 117 | ||||
-rw-r--r-- | man/xmltoman.css | 30 | ||||
-rw-r--r-- | man/xmltoman.dtd | 39 | ||||
-rw-r--r-- | man/xmltoman.xsl | 120 |
5 files changed, 343 insertions, 0 deletions
diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100644 index 0000000..ede7107 --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1,37 @@ +# $Id$ + +# This file is part of bidilink. +# +# bidilink 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. +# +# bidilink 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 bidilink; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +man_MANS = bidilink.1 + +noinst_DATA = bidilink.1.xml + +EXTRA_DIST = $(man_MANS) bidilink.1.xml.in xmltoman.css xmltoman.xsl xmltoman.dtd + +CLEANFILES = bidilink.1.xml + +bidilink.1.xml: bidilink.1.xml.in Makefile + sed -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@ + +if USE_XMLTOMAN + +CLEANFILES += $(man_MANS) + +bidilink.1: bidilink.1.xml Makefile + xmltoman $< > $@ + +endif diff --git a/man/bidilink.1.xml.in b/man/bidilink.1.xml.in new file mode 100644 index 0000000..15dc33a --- /dev/null +++ b/man/bidilink.1.xml.in @@ -0,0 +1,117 @@ +<?xml version="1.0" standalone='no'?> +<!DOCTYPE manpage SYSTEM "xmltoman.dtd"> +<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?> + +<!-- $Id$ --> + +<!-- + This file is part of bidilink. + + bidilink 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. + + bidilink 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 bidilink; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +--> + + <manpage name="bidilink" section="1" desc="Bidirectional stream linker"> + + <synopsis> + <cmd>bidilink [<opt>-v|--verbose</opt>] <arg>STREAM1</arg> [<arg>STREAM2</arg>]</cmd> + <cmd>bidilink <opt>-h|--help</opt></cmd> + </synopsis> + + <description> + <p>bidilink is a general purpose Unix tool for linking two + bidirectional data streams together. It extends the standard + Unix "filter" paradigma to bidrectional streams.</p> + + <p>bidilink has support for several different drivers which may + be connected. You have to specify at least one, at most two of + them on the command line. If you specify just one driver the + second is automatically set to <opt>std:</opt>, which is the combination + of the process' STDIN and STDOUT.</p> + + <p>Besides the order of initialization there is no difference in + specifying the stream specifications in a different order.</p> + </description> + + <options> + + <option> + <p><opt>-v | --verbose</opt></p> + <optdesc><p>Show throughput information on STDERR while running.</p></optdesc> + </option> + + <option> + <p><opt>-h | --help</opt></p> + <optdesc><p>Show a terse usage information</p></optdesc> + </option> + + </options> + + <section name="Drivers"> + + <p><opt>std:</opt> The process STDIN and STDOUT pipes. If you + connect the <opt>std:</opt> driver with itself, strange things + may happen.</p> + + <p><opt>exec:PROGRAM</opt> Fork off a process and use its STDIN + and STDOU pipes.</p> + + <p><opt>tty:DEVICE</opt> Open a TTY device (like + <opt>/dev/ttyS0</opt>). If you want to change TTY parameters + (like baudrate) do so by calling <manref name="stty" + section="1"/> previous to running bidilink.</p> + + <p><opt>pty:[PTYSYMLINK]</opt> Open a pseudo TTY (PTY) as master + and create a symbolic link to the slave device. If you omit the + symlink path the name of the PTY slave is written to STDERR.</p> + + <p><opt>tcp-client:HOSTNAME:PORT</opt> Connect a TCP socket to a + remote host.</p> + + <p><opt>tcp-server:[IPADDRESS:]PORT</opt> Listen a local port and + wait for an incoming connection. You may specify an IP adress to + listen on. If you omit that the default of 0.0.0.0 is selected, + i.e. listen on all local IP adresses. This driver is limited to + a single connection. After an incoming connection was + established bidilink will close the listening port.</p> + + <p><opt>unix-client:SOCKNAME</opt> Make a stream connection to a + local Unix socket.</p> + + <p><opt>unix-server:SOCKNAME</opt> Listen on a local Unix + socket. This driver is limited to a single connection in the + same way as <opt>tcp-server:</opt></p> + + </section> + + <section name="See also"> + <p> + <manref name="stty" section="1"/> + </p> + </section> + + <section name="Author"> + <p>bidilink was written by Lennart Poettering + <@PACKAGE_BUGREPORT@>. bidilink is available + at <url + href="@PACKAGE_URL@"/> + </p> + </section> + + <section name="Comments"> + <p>This man page was written using <manref name="xmltoman" 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..1548583 --- /dev/null +++ b/man/xmltoman.css @@ -0,0 +1,30 @@ +/* $Id$ */ + +/*** + This file is part of bidilink. + + bidilink 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. + + bidilink 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 bidilink; 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..b8c9d00 --- /dev/null +++ b/man/xmltoman.dtd @@ -0,0 +1,39 @@ +<!-- $Id$ --> + +<!-- + This file is part of bidilink. + + bidilink 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. + + bidilink 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 bidilink; 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..37eccc8 --- /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 bidilink. + + bidilink 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. + + bidilink 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 bidilink; 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="xmltoman.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> |