From 68dda0a7d8939487c8191a5bdaae7af19d962482 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 10 Sep 2009 13:40:38 +0200 Subject: [PATCH] Man page generation. --- .gitignore | 4 +++- configure | 21 +++++++++++++-------- {website => doc}/api.txt | 4 ++-- {website => doc}/index.html | 0 {website => doc}/pipe.css | 0 {website => doc}/sh_javascript.min.js | 0 {website => doc}/sh_main.js | 0 {website => doc}/sh_vim-dark.css | 0 {website => doc}/toc.js | 0 src/node.cc | 4 +++- wscript | 1 + 11 files changed, 22 insertions(+), 12 deletions(-) rename {website => doc}/api.txt (99%) rename {website => doc}/index.html (100%) rename {website => doc}/pipe.css (100%) rename {website => doc}/sh_javascript.min.js (100%) rename {website => doc}/sh_main.js (100%) rename {website => doc}/sh_vim-dark.css (100%) rename {website => doc}/toc.js (100%) diff --git a/.gitignore b/.gitignore index 9aa2a655d2..3aef4887ca 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ tags .lock-wscript Makefile *.pyc -website/api.html +doc/api.html +doc/api.xml +doc/node.1 node node_g diff --git a/configure b/configure index 87110b2dd7..e9e31910f5 100755 --- a/configure +++ b/configure @@ -106,20 +106,25 @@ test-debug: all benchmark: all build/default/node benchmark/run.js -website: website/api.html website/index.html +doc: doc/node.1 doc/api.html doc/index.html -website/api.html: website/api.txt +doc/api.html: doc/api.txt asciidoc --unsafe \\ -a theme=pipe \\ -a toc \\ -a linkcss \\ - -o website/api.html website/api.txt + -o doc/api.html doc/api.txt -# -a stylesdir=website/ \\ -# -a scriptsdir=website/ \\ +doc/api.xml: doc/api.txt + asciidoc -b docbook -d manpage -o doc/api.xml doc/api.txt -website-upload: website - scp website/* linode:~/tinyclouds/node/ +doc/node.1: doc/api.xml + xsltproc --output doc/node.1 \\ + --nonet /etc/asciidoc/docbook-xsl/manpage.xsl \\ + doc/api.xml + +website-upload: doc + scp doc/* linode:~/tinyclouds/node/ clean: @$WAF clean @@ -136,7 +141,7 @@ check: dist: @$WAF dist -.PHONY: benchmark clean dist distclean check uninstall install all test test-all website website-upload +.PHONY: benchmark clean dist distclean check uninstall install all test test-all website-upload EOF } diff --git a/website/api.txt b/doc/api.txt similarity index 99% rename from website/api.txt rename to doc/api.txt index a4583c6857..0e289bf01b 100644 --- a/website/api.txt +++ b/doc/api.txt @@ -4,13 +4,13 @@ Ryan Dahl Version, 0.1.9, 2009.09.05 -== Name +== NAME node - evented I/O for V8 javascript -== Synopsis +== SYNOPSIS An example of a web server written with Node which responds with "Hello World" after waiting two seconds: diff --git a/website/index.html b/doc/index.html similarity index 100% rename from website/index.html rename to doc/index.html diff --git a/website/pipe.css b/doc/pipe.css similarity index 100% rename from website/pipe.css rename to doc/pipe.css diff --git a/website/sh_javascript.min.js b/doc/sh_javascript.min.js similarity index 100% rename from website/sh_javascript.min.js rename to doc/sh_javascript.min.js diff --git a/website/sh_main.js b/doc/sh_main.js similarity index 100% rename from website/sh_main.js rename to doc/sh_main.js diff --git a/website/sh_vim-dark.css b/doc/sh_vim-dark.css similarity index 100% rename from website/sh_vim-dark.css rename to doc/sh_vim-dark.css diff --git a/website/toc.js b/doc/toc.js similarity index 100% rename from website/toc.js rename to doc/toc.js diff --git a/src/node.cc b/src/node.cc index 74db700430..f4485379b6 100644 --- a/src/node.cc +++ b/src/node.cc @@ -446,7 +446,9 @@ PrintHelp ( ) printf("Usage: node [switches] script.js [arguments] \n" " -v, --version print node's version\n" " --cflags print pre-processor and compiler flags\n" - " --v8-options print v8 command line options\n"); + " --v8-options print v8 command line options\n\n" + "Documentation can be found at http://tinyclouds.org/node/api.html" + " or with 'man node'\n"); } static void diff --git a/wscript b/wscript index 2c374fd916..232bf47acc 100644 --- a/wscript +++ b/wscript @@ -347,3 +347,4 @@ def build(bld): src/events.h src/net.h """); + bld.install_files('${PREFIX}/share/man/man1/', 'doc/node.1');