Home

HTMIPF


Date : 27 - February - 2008
Author : Jasper de Keijzer

HTMIPF is a freeware html to ipf compiler for OS/2.
The program is written by: Jasper. de Keijzer.

The program may be distributed, but only when the readme is included!

Command line
Syntax checking
Some restrictions and limitations
Conclusion
Download the compiler
Contact the author
 

Command line.

htmipf  {<infile> | /MAP:<mapfile> } { /OUT:<outfile> }

infile : the file to be compiled.
example:
HTMIPF hello.html. The compiler will parse the hello.htm file and all the files which are referenced in this file and create hello.ipf. All GIF,TIF,PCX,Win BMP images are automatically converted to OS/2 bitmap files and put in the current working directory, with the same name as the image found in the HTML file. UNI0X1.GIF will be translated
to UNI0X1.BMP. The initial file <infile> gets an ipf panel with the name "doc" all referenced files get a panel name with the reference name. The compiler can create named panels, see the /MAP: option. The compiler will not generate an index. The final ipf file must be compiled with the IPFC compiler to get the final document. The IPF
source can be used for .HLP and .INF files.

/MAP:<mapfile>
When this option is used the /OUT:<outfile> becomes mandatory. This option is used to compile unrelated html files into one ipf file.
 

Map file format.

#uuapex20  hello.htm   [<level>]
level     : 'h' | 'H' <number>
number    :  1...9. (1 is default)
The hash<name> is the helptopic.

example of a map file:
#MyPanelName   hello.htm
#ThisPanel     manual.htm

The compiler starts with reading the hello.htm and gives it the panel name "MyPanelName". When the file manual.htm is not already compiled and thus not referenced in hello.htm, the compiler will compile manual.htm and give it the panel name "ThisPanel". The panel names can be used in 3GL and 4GL programs to access the online help. To define at what level the panel should appear, you can specify a number. For instance

#MyPanelName   hello.htm
#ThisPanel     manual.htm    h2

In this example the first file gets a headinglevel of one, while the second gets a headinglevel of two.

/OUT:<outfile>
With this option the filename of the compiled source can be defined. When not defined, the compiler will create an IPF file with the same name as the HTML file. This option is mandatory when the /MAP: option is used.
 

Syntax checking

Most HTML files are not strict. Open tags are sometimes not closed or implicitly closed with non related tags. The compiler will give a warning on this and fix it for ipf. Although the compiler can fix a lot, it is recommended to create strict HTML files to avoid unpredictable compiler output.
 
 

Some restrictions and limitations.

<TABLES> - IPF tables cannot contain images. When the HTML table contains two columns the compiler translates the table into a definition list which is less strict as the IPF table. Hence, HTML tables with two columns may contain images and other mark up tags. The maximum column with in the compiled source is 40 characters.

<FONT> - Only the courier font can be set. Other fontnames are ignored.
 

Conclusion.

Due to the richness of HTML  the output of the compiler may still contain some erroneous IPF statements. In particular this is the case when definition lists are used in HTML. In HTML these lists may actually contain everything and in IPF they only may contain plain text. You can imagine how many errors this will give when the final IPF source is compiled with the IPF compiler of IBM. Of course there are a lot more examples to give where HTML has more features than IPF but this is just one of them. The conclusion is simple, the HTMIPF compiler is a nice tool but with complex HTML files you need to edit the output manually. The latter is made easy due to the headers emitted by the compiler for each individual chapter.
 

Download the compiler.

htmipf13.zip
 
 

Contact the author

For comments suggestions etc email:Jasper de Keijzer.

Or have a look at  the DrawIt home page.