summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@lshift.net>2010-03-04 16:18:28 +0000
committerSimon MacMullen <simon@lshift.net>2010-03-04 16:18:28 +0000
commit2bd8fc4538d13028bc1ffc9b17705f5327a1a865 (patch)
tree09df23a0426323db4e87574470c15b9adeebefa8
parent01cb70a25cef929f10c5590d7201d2be80bfdf55 (diff)
downloadrabbitmq-server-2bd8fc4538d13028bc1ffc9b17705f5327a1a865.tar.gz
Make web versions of all the man pages.
-rw-r--r--.hgignore2
-rw-r--r--Makefile21
-rw-r--r--docs/html-to-website-xml.xsl14
-rw-r--r--docs/rabbitmq-multi.1.xml8
-rw-r--r--docs/rabbitmq.conf.5.xml2
5 files changed, 29 insertions, 18 deletions
diff --git a/.hgignore b/.hgignore
index d0214642..a7cf4cb1 100644
--- a/.hgignore
+++ b/.hgignore
@@ -27,5 +27,5 @@ syntax: regexp
^packaging/windows/rabbitmq-server-windows-.*\.zip$
^docs/.*\.[15]\.gz$
-^docs/rabbitmqctl.html$
+^docs/.*.man.xml$
^docs/.*\.usage.erl$
diff --git a/Makefile b/Makefile
index 1264f904..cd6b1420 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,7 @@ BEAM_TARGETS=$(patsubst $(SOURCE_DIR)/%.erl, $(EBIN_DIR)/%.beam, $(SOURCES))
TARGETS=$(EBIN_DIR)/rabbit.app $(INCLUDE_DIR)/rabbit_framing.hrl $(BEAM_TARGETS)
WEB_URL=http://stage.rabbitmq.com/
MANPAGES=$(patsubst %.xml, %.gz, $(wildcard docs/*.[0-9].xml))
+WEB_MANPAGES=$(patsubst %.xml, %.man.xml, $(wildcard docs/*.[0-9].xml))
USAGES=$(patsubst %.1.xml, %.usage.erl, $(wildcard docs/*.[0-9].xml))
ifeq ($(shell python -c 'import simplejson' 2>/dev/null && echo yes),yes)
@@ -107,7 +108,7 @@ clean:
rm -f $(EBIN_DIR)/*.beam
rm -f $(EBIN_DIR)/rabbit.app $(EBIN_DIR)/rabbit.boot $(EBIN_DIR)/rabbit.script $(EBIN_DIR)/rabbit.rel
rm -f $(INCLUDE_DIR)/rabbit_framing.hrl $(SOURCE_DIR)/rabbit_framing.erl $(SOURCE_DIR)/rabbitmqctl_usage.erl codegen.pyc
- rm -f docs/*.[0-9].gz docs/*.usage.erl docs/*.html docs/*.erl
+ rm -f docs/*.[0-9].gz docs/*.usage.erl docs/*.man.xml docs/*.erl
rm -f $(RABBIT_PLT)
rm -f $(DEPS_FILE)
@@ -212,14 +213,16 @@ distclean: clean
# in a namespace.
# Also we rename the file before xmlto sees it since xmlto will use the name of
# the file to make internal links.
-rabbitmqctl.xml: docs/rabbitmqctl.1.xml docs/html-to-website-xml.xsl
- cp docs/rabbitmqctl.1.xml rabbitmqctl.xml && xmlto xhtml-nochunks rabbitmqctl.xml ; rm rabbitmqctl.xml
- cat rabbitmqctl.html | grep -v DOCTYPE | sed -e s,xmlns=\"http://www.w3.org/1999/xhtml\",, | xsltproc docs/html-to-website-xml.xsl - | xmllint --format - > rabbitmqctl.xml
- rm rabbitmqctl.html
- # TODO how should this really be deployed?
- cp rabbitmqctl.xml ../rabbitmq-website/site/
-
-docs_all: $(MANPAGES) rabbitmqctl.xml
+%.man.xml: %.xml docs/html-to-website-xml.xsl
+ cp $< `basename $< .xml`.xml && \
+ xmlto xhtml-nochunks `basename $< .xml`.xml ; rm `basename $< .xml`.xml
+ cat `basename $< .xml`.html | grep -v DOCTYPE | \
+ sed -e s,xmlns=\"http://www.w3.org/1999/xhtml\",, | \
+ xsltproc --stringparam original `basename $<` \
+ docs/html-to-website-xml.xsl - | xmllint --format - > $@
+ rm `basename $< .xml`.html
+
+docs_all: $(MANPAGES) $(WEB_MANPAGES)
install: SCRIPTS_REL_PATH=$(shell ./calculate-relative $(TARGET_DIR)/sbin $(SBIN_DIR))
install: all docs_all install_dirs
diff --git a/docs/html-to-website-xml.xsl b/docs/html-to-website-xml.xsl
index 888260a3..7b20d060 100644
--- a/docs/html-to-website-xml.xsl
+++ b/docs/html-to-website-xml.xsl
@@ -3,6 +3,8 @@
xmlns:doc="http://www.rabbitmq.com/namespaces/ad-hoc/doc"
version='1.0'>
+<xsl:param name="original"/>
+
<xsl:output method="xml" doctype-public="bug in xslt processor requires fake doctype" doctype-system="otherwise css isn't included" />
<xsl:template match="*"/>
@@ -17,13 +19,19 @@
<xsl:processing-instruction name="xml-stylesheet">type="text/xml" href="page.xsl"</xsl:processing-instruction>
<html xmlns:doc="http://www.rabbitmq.com/namespaces/ad-hoc/doc">
<head>
- <title>rabbitmqctl(1) manual page</title>
+ <title><xsl:value-of select="document($original)/refentry/refnamediv/refname"/>(<xsl:value-of select="document($original)/refentry/refmeta/manvolnum"/>) manual page</title>
</head>
<body>
<doc:div>
<p>
- This is the manual page for the <code>rabbitmqctl</code> command. For
- more general documentation, please see the
+ This is the manual page for
+ <code><xsl:value-of select="document($original)/refentry/refnamediv/refname"/>(<xsl:value-of select="document($original)/refentry/refmeta/manvolnum"/>)</code>.
+ </p>
+ <p>
+ <a href="manpages.html">See a list of all manual pages</a>.
+ </p>
+ <p>
+ For more general documentation, please see the
<a href="admin-guide.html">administrator's guide</a>.
</p>
diff --git a/docs/rabbitmq-multi.1.xml b/docs/rabbitmq-multi.1.xml
index 953fd7a5..b3862fdf 100644
--- a/docs/rabbitmq-multi.1.xml
+++ b/docs/rabbitmq-multi.1.xml
@@ -44,7 +44,7 @@ machine.
<title>Commands</title>
<variablelist>
<varlistentry>
- <term>start_all <replaceable>count</replaceable></term>
+ <term><cmdsynopsis><command>start_all</command> <arg choice="req"><replaceable>count</replaceable></arg></cmdsynopsis></term>
<listitem>
<para>
Start count nodes with unique names, listening on all IP addresses and
@@ -59,7 +59,7 @@ on sequential ports starting from 5672.
</varlistentry>
<varlistentry>
- <term>status</term>
+ <term><cmdsynopsis><command>status</command></cmdsynopsis></term>
<listitem>
<para>
Print the status of all running RabbitMQ nodes.
@@ -68,7 +68,7 @@ Print the status of all running RabbitMQ nodes.
</varlistentry>
<varlistentry>
- <term>stop_all</term>
+ <term><cmdsynopsis><command>stop_all</command></cmdsynopsis></term>
<listitem>
<para>
Stop all local RabbitMQ nodes,
@@ -77,7 +77,7 @@ Stop all local RabbitMQ nodes,
</varlistentry>
<varlistentry>
- <term>rotate_logs</term>
+ <term><cmdsynopsis><command>rotate_logs</command></cmdsynopsis></term>
<listitem>
<para>
Rotate log files for all local and running RabbitMQ nodes.
diff --git a/docs/rabbitmq.conf.5.xml b/docs/rabbitmq.conf.5.xml
index 6015347c..dcb1e49c 100644
--- a/docs/rabbitmq.conf.5.xml
+++ b/docs/rabbitmq.conf.5.xml
@@ -68,7 +68,7 @@ environment variable names, with the <envar>RABBITMQ_</envar> prefix removed:
<para role="example">
This is an example of a complete
<filename>/etc/rabbitmq/rabbitmq.conf</filename> file that overrides the default Erlang
- node name from "rabbit" to "hare":
+ node name from "rabbit" to "hare".
</para>
</refsect1>