next up previous contents index
Next: List File Pack/Unpack Utilities: Up: The XicTools Accessories Previous: Help to HTML Conversion   Contents   Index


Web Server Bridge to Help Database: hlpsrv

This is a server for the help database, which, through use of a simple cgi script, allows the help system to be accessed through a web server, such as Apache. Thus, the help database can be exported over the internet, as seen on the Whiteley Research web site wrcad.com.

There are three environment variables that must be set:

HLPSRV_PATH
The full real path to the help database files.

HLPSRV_CGIPATH
The server path to a cgi script, with argument prefix. This is prepended to the anchor text for all help keyword anchors. For example, the .hlp file contains
<a href="keyword">
and we have
HLPSRV_CGIPATH = "/cgi-bin/hlpsrv.cgi?h="
Then, the tag would be converted to
<a href="/cgi-bin/hlpsrv.cgi?h=keyword">

HLPSRV_IMPATH
The server path to images called from help database files. This is prepended to the path which follows src= in img tags. Images should be linked or moved to this location.

The invocation arguments are database keywords. The program dumps the Content-type header and topic text to the standard output.

Below is an example Apache cgi script, which makes available the Xic help database. This would be installed in the server's cgi-bin as (e.g.) xichelp.cgi.

#! /bin/sh

IFS='='
set $QUERY_STRING

export HLPSRV_PATH="/usr/local/xictools/xic/help"
export HLPSRV_CGIPATH="/cgi-bin/xichelp.cgi?h="
export HLPSRV_IMPATH="/help-images/"

/usr/local/xictools/bin/hlpsrv $2

In web pages, the help system can then be accessed using code like

<a href="/cgi-bin/xichelp.cgi?h=xic">
Click here</a> to enter the on-line <b><i>Xic</i></b> help system.<br>

The word that follows ?h is a help database keyword.


next up previous contents index
Next: List File Pack/Unpack Utilities: Up: The XicTools Accessories Previous: Help to HTML Conversion   Contents   Index
Stephen R. Whiteley 2022-05-28