A new MIF to HTML converter, written in C

Jim McBeath ([email protected])
Tue, 15 Feb 1994 12:48:57 --100


For those of you who have been frustrated by MIF converters written
in perl, lisp, or other advanced languages, here's one written entirely
in C. OK, to be honest, there are also two 20 line sh scripts.

It comes with a preliminary manual which you can run through miftran
to make HTML pages. This serves as a test to make sure miftran
compiled correctly on your system, as an example, and as the actual
documentation for miftran.

This is version 0.1, with all the caveats that a version number like
that implies. You can pick it up (40K) from

ftp://ftp.alumni.caltech.edu/pub/mcbeath/web/miftran/miftran.tgz

Below is the README file.

-Jim McBeath
[email protected]

Miftran v0.1 14.Feb.94

Miftran is a general purpose MIF (Framemaker's Maker Interchange
Format) translation program. It was designed primarily to translate
to HTML, but is flexible enough that it could be used for other
translations.

The latest version of miftran is most likely to be found in
ftp://ftp.alumni.caltech.edu/pub/mcbeath/web/miftran

Miftran has the following features:

- Written in C (plus a few very small sh scripts).

- Externally configurable with a single configuration (RC) file,
which can be customized for each MIF file to be translated.
ALL output text is controlled by contents of RC file.

- Based on paragraph and font tags.

- Generates Table of Contents (based on chapters, etc.) and Index
(based on Index markers), controlled by configuration file.

- Accepts a single MIF input file, but can produce multiple
output files (e.g. split by chapters, sections, etc.),
based on configuration file.

- Converts cross-references to HTML links,
based on configuration file.

- String substitution allows converting special characters.

- For advanced users, the C source can be relatively easily
customized to recognize additional MIF constructs.

- Freely redistributable with an MIT/X11 style copyright.
You can even put it into a commercial product and sell it
if you want, as long as you preserve and acknowlege our copyright.

Miftran has the following limitations:

- Only handles single MIF files. If you have multiple MIF files,
you will have to process them one at a time. You can probably
make this work by munging the html/Makefile and the sh scripts.

- Does not handle anchored frames and inline images.

- Does not handle conditional text.

- No special handling of tables.

- Does not handle paragraph and font formatting based on anything
other than tags.

To compile and test miftran:
1. Do a "make" in this directory. This will build the miftran program.
2. Cd to the html directory and do another "make". This will create
a set of HTML files, one per chapter, for the miftran.mif manual.
3. In the html directory, do a "make diff" to compare the html/*.html
files against the htmlref/*.html files. They should be identical.
4. Run your favorite HTML browser starting at TOC.html.

This early version has been tried on a very limited sample of MIF files.

Miftran has been compiled and run on the following machines:
Sparc SunOS 4.1.3
Sparc Solaris 2.2 with gcc

If you use miftran, please send me email and let me know about it.
If you are using a machine or OS that is not in the above list,
please let me know, especially if there were any changes required
to get it to work.

Author: Jim McBeath
[email protected] [email protected] [email protected]