... Inf-HTML v0.8b ...


Usage

Inf-HTML.EXE is designed to act as a interface between a WWW server (such as the httpd port os2httpd by Frankie Fan) and the information contained in Os/2 Inf/Hlp files.

Files

The files in this package that are required for operation are -

inf-html.exe
The main file required. This file can be placed anywhere as long as it is correctly referenced in readinf.cmd.
This file needs no configuration files, external files, etc to run and does not need to be in the path.
This file is not designed to be run by an end user but called by httpd with paramaters. From these paramaters inf-html returns a HTML document to the server.
readinf.cmd
This is a simple batch file that passes its arguments to inf-html.exe so check that it points the the location of the executable.
This file must reside in the /cgi-bin/ directory off the /os2httpd/ directory.

The files that make things more complete

/inf-html/inf-html.htm etc
The files in the /inf-html/ directory should be located in a /inf-html/ directory off the /os2httpd/docs/ directory. These files include about files, usage files, and graphics.
/inf-html/*.gif
inf-html.gif, about.gif, idx.gif, and toc.gif are used by inf-html to make things look a bit better. I have tried to make these as small a possible so that they won't slow things down. They are 8-bit.
/inf-html/pics/*.gif
This location is where graphics files are placed for fudged inline graphics. Out of the box are are few graphics used in the os/2 command reference inf file, teamos2 newsletter, and os2faq.

OK, how do I access this crap?

I won't go into specifics but I'll provide some examples here. From this you should be able to understand how to work it out.

Providing access to the whole Inf/Hlp file

Say you have a Team Os/2 Newsletter that you want to provide a link to in a WWW page. Simply add the following to the page -

<a href="/cgi-bin/readinf.cmd?x:^path^team0294.inf"> Team Os/2 Newsletter </a>

Where x:^mydir^team9404.inf is the fully qualified path to the file. Note that forward or backslashes aren't used but rather the carrot symbol. The +toc bit tells Inf-HTML to display a Table of Contents for the Document. In this the Table of Contents items are linked to articles, the same as the contents listing via view.exe.

Bonus Info

You'll notice that the Table of Contents has expandable/collapsable headings (same as view.exe) that are fully functional. Inf-HTML keeps track of which of these are open by using additional arguements to the above. When you click on a [+] it links to something like -

/cgi-bin/readinf.cmd?x:^mydir^team9404.inf+toc+1

The numbers added to the command line tell Inf-HTML which headings are expanded. You should not have to specify these numbers when adding links - unless you really want to!! Each Table of Contents item also has a < name="1"> entry so you could make your script jump to a index entry if you wanted with something like -

<a href="/cgi-bin/readinf.cmd?x:^mydir^team9404.inf+toc+1#21">

which would tell the browser to jump to index item 21.

You probably will never need this stuff. It is only provided so you know how it works.

Providing access to a single article

Hmm... this is easy enough to do except that you have to know the index number of the article. These easiest way to do this is set up the above then look at article link in the Table of Contents.

The format for a article link is -

<a href="/cgi-bin/readinf.cmd?x:^mydir^team9404.inf+text+5"> link </a>

where +5 is the article index number.


Later, Peter Childs

INTERNET: pjchilds@apanix.apana.org.au

FIDONET: Peter Childs 3:800/3 (South Australian Country Club)