The header file "OL_DOC.DH" provides a powerful range of facilities to allow you to create electronic documentation. It currently supports IPF/INF and HTML generation but there is no reason this can't be extended in the future.
The IPF and HTML versions of the document you are now viewing were produced by the same method.
Note that the facilities provided here much simplify the generation of complex documentation and I would recommend it's use even if you were limiting yourself to a single target output format.
Using the facilities of this header file your source files need contain no IPF or HTML tags, although it is simple to conditionally include your own HTML or IPF tags as required.
The examples batch files (below) will give you an idea of how to invoke ppwizard to generate documentation however please note that it is very important not to hardcode a filename on the /output switch when generating html or ppwizard will fail as each heading will try to update the same file.
This is not a recommended way to produce HTML webpages. It's aim is to provide a subset of commands that are useful in the creation of documentation (which may of course be placed on the web).
For more information have a look at the tags and options documentation as well as the simplistic example source.
This shows a simple batch file which takes a source file
and generates one or more HTML pages:
@echo off
REM *** Name of the .INF ****************************************************
setlocal
if "%1" == "" SET INFNAME=TEST
if not "%1" == "" SET INFNAME=%1
REM *** Generate the .HTM ***************************************************
set DEBUG=/debug
set DEBUG=
call ppwizard.cmd %INFNAME%.D %DEBUG% /output:out\*.htm /crlf /define:DocType=HTML
Note that the /output switch above specified "out\*.htm", all pages will therefore be generated in the "out" directory and they will all have the extension ".htm".
Note that the "*" is very important, you must not "hardcode" the name of the html file since for html generation each Heading generates a new page and with a hardcoded name each pages will use the same filename (and ppwizard will then fail)!
This shows a simple batch file which takes a source file
and generates the IPF source which can then be compiled to
generate an OS/2 INF file:
@echo off
REM *** Name of the .INF ****************************************************
setlocal
if "%1" == "" SET INFNAME=TEST
if not "%1" == "" SET INFNAME=%1
REM *** Generate the .IPF ***************************************************
set DEBUG=
set DEBUG=/debug
call ppwizard.cmd %INFNAME%.D %DEBUG% /output:out\*.ipf /crlf /define:DocType=IPF
if errorlevel 1 goto ERROR
REM *** Compile the .IPF to create a .INF ***********************************
SETLOCAL
CD OUT
IPFC.EXE %INFNAME%.IPF /S /INF
if errorlevel 1 goto ERROR
goto EndBatch
:ERROR
echo ERROR: Somethings wrong!
:EndBatch