X-Git-Url: https://git.distorted.org.uk/~mdw/sw-tools/blobdiff_plain/9796a7877cd1e7f6908c678e71b8fea6045ba0e7..e55daacc8888ea40715a620cf21bef29583a670f:/perl/sw-cgi.1 diff --git a/perl/sw-cgi.1 b/perl/sw-cgi.1 index f5f5012..634a2c2 100644 --- a/perl/sw-cgi.1 +++ b/perl/sw-cgi.1 @@ -1,6 +1,6 @@ .\" -*-nroff-*- .\" -.\" $Id: sw-cgi.1,v 1.2 2004/04/08 01:52:19 mdw Exp $ +.\" $Id$ .\" .\" Man page for `sw' CGI script .\" @@ -25,6 +25,81 @@ .\" along with sw-tools; if not, write to the Free Software Foundation, .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. . +.\"----- Style hacking ------------------------------------------------------ +. +.de VS \" Start a sort-of verbatim block +.sp 1 +.in +5n +.nf +.ft B +.. +.de VE \" Stop a sort-of verbatim block +.ft R +.fi +.in -5n +.sp 1 +.. +.ie \n(.g \{\ +. fam P +. ds mw \fR[\f(BImdw\fR] +.\} +.el .ds mw \fR[\fBmdw\fR] +.ie t .ds o \(bu +.el .ds o o +.ds sw \fBsw\fP +. +.\"----- Main manual text --------------------------------------------------- +. +.TH sw-cgi 1 "30 July 1999" sw-tools +.PD 1 +. +.\"-------------------------------------------------------------------------- +. +.SH "NAME" +. +sw-cgi \- CGI script for browsing installed software and documentation +. +.\"-------------------------------------------------------------------------- +. +.SH "SYNOPSIS" +. +.IB prefix /cgi-bin/sw +.RI [ key = value ]... +. +.\"-------------------------------------------------------------------------- +. +.SH "DESCRIPTION" +. +The +.B sw +CGI script provides users with a pleasant-ish interface for browsing the +list of locally installed software and its documentation. +.PP +The script picks up arguments from HTTP +.B GET +or +.B POST +requests, or from the command line (which is useful when debugging). +Given no arguments, it emits a table of installed software read from the +index file in +.IB prefix /sw-index +together with links to documentation. +.PP +The program assumes that any +.I package +has documentation stashed in +.IB prefix /doc/ package +in plain text format. You can require your installers to do this by +putting this code in a +.B sw-precommit +script (see the +.B "Command reference" +in +.BR sw (1) +for details): +.VS +# --- Ensure the documentation file exists --- + if [ ! -r "$SW_PREFIX/doc/$SW_PACKAGE" ]; then echo >&2 "no documentation file \`$SW_PREFIX/doc/$SW_PACKAGE'" exit 1