Queen's University of Belfast
Parallel Computer Centre

Converting Framemaker documents into HTML


This document has been written with the specific needs of The Parallel Computer Centre at Queen's in mind; reference is made to resources on the PCC network and the conversion rules are tailored to the two main document types the PCC uses, i.e. OHP slides and student notes.

Setting up the FrameMaker documents

The Conversion process uses up a great deal of Hard Disk space. So firstly we need to make a copy of the FrameMaker file(s) in a directory where there is no very restrictive quota restraint.
WebMaker 1.4, which we will use for the conversion, cannot convert FrameMaker documents directly. What we need to do is convert the relevant file(s) into Maker Interchange Format (MIF) files. The way we do this depends on whether we are converting a single file or a book of files:

Creating a WebMaker Configuration file

Firstly, run the configuration file creation program wmconfig. The syntax for this program is:
wmconfig -c <config file name> <file name>
where <config file name> is the name you wish to give to the generated configuration file (This should have the suffix .wml), and <file name> is the name of the file / book you wish to convert.

Now this generated configuration file wil convert the file(s) into a single HTML document with all text rendered exactly the same. So we need to modify the file to suit our needs.
Firstly we need to stick in some NODE rules, which define how the document is to be split up. These NODE rules should be the same in all PCC documents. So I have included them here. Copy them into the configuration file (filling in the relevant fields) in an appropriate place (the actual position should be towards the top of the configuration file).

VARIABLE @NavPanel
NODE FirstPage
{
  TITLE "<Name of document structure>, QUB"
  HEADER
  {
  @NavPanel=concatenate(button("[Next] ",    filename(next),    "[Next] "    ),button("[Previous] ",filename(previous),"[Previous] "),button("[Top] ",     filename(top),     "[Top] "     ));
  write(*,link("The Queen's University of Belfast","http://www.qub.ac.uk/"));
  write(*,hrule());
  write(*,paragraph(concatenate(image("http://www.qub.ac.uk/graphics/crest.gif",bottom),image("http://www.pcc.qub.ac.uk/gifs/pcclogo3b.gif",bottom),link("Parallel Computer Centre","http://www.pcc.qub.ac.uk"))));
  write(*,paragraph(@NavPanel))
  }
  FOOTER
  {
   write(*,hrule());
   write(*,toc(2,global));
   write(*,hrule());
   write(*,@NavPanel);
   write(*,hrule());
   write(*,address(concatenate(" All documents are the responsibility of, and copyright, © their authors and do not represent the views of The Parallel Computer Centre, nor of The Queen's University of Belfast.",break(),"Maintained by Alan Rea, email ",link("A.Rea@qub.ac.uk","mailto:A.Rea@qub.ac.uk"))));
  }
}

NODE BasicSection
{
TITLE concatenate("<shortened title> ",headingtext(current),", QUB")
HEADER
	{
	@NavPanel=concatenate(button("[Next] ",    filename(next),    "[Next] "    ),button("[Previous] ",filename(previous),"[Previous] "),button("[Top] ",     filename(top),     "[Top] "     ));
	write(*,link("The Queen's University of Belfast","http://www.qub.ac.uk/"));
	write(*,hrule());
	write(*,paragraph(concatenate(image("http://www.qub.ac.uk/graphics/crest.gif",bottom),image("http://www.pcc.qub.ac.uk/gifs/pcclogo3b.gif",bottom),link("Parallel Computer Centre","http://www.pcc.qub.ac.uk"))));
	write(*,paragraph(@NavPanel))
	}
FOOTER
	{
	write(*,hrule());
	write(*,@NavPanel);
	write(*,hrule());
	write(*,address(concatenate(" All documents are the responsibility of, and copyright, © their authors and do not represent the views of The Parallel Computer Centre, nor of The Queen's University of Belfast.",break(),"Maintained by Alan Rea, email ",link("A.Rea@qub.ac.uk","mailto:A.Rea@qub.ac.uk"))));
	}
}

Other Alterations which would need to be done are as follows:

Running Webmaker

Once you have made your configuration file, you are ready to run WebMaker itself.
This is done with the following command:
webmaker -c <config file name> <file name>
i.e. exactly the same as running wmconfig, but replacing it with webmaker. The generated HTML file (without graphics) are put into the directory wmwork/www/ . It is useful at this stage to check these files (on any WWW browser) to make sure the results are satisfactory. If not, you need to alter the configuration file further, making the necessary modifications, and then re-running webmaker.

Running the graphics conversion package

Making sure you are in the directory where the rest of the conversion has taken place (not, for example, wmwork/www/), you can run the graphics program by typing:
wmgraph -G -V -n <name>
where <name> is the prefix to the original file / book name
i.e. if you are converting the file sample_file.MIF, <name> would be sample_file
or if you are converting the Book sample_bookMIF.book, <name> would be sample_bookMIF

For most documents, the Graphics conversion program is very slow and grinds your machine. It is probably a good idea to have it running overnight.

Cleaning up the created files

WebMaker creates HTML files, but not great HTMl Files.

We want to be proud of out HTML. It should be a beacon in the darkened world of Mediocrity. So we need to make a few alterations to the files created:

Documents Created!

After having passed all these tests, your finished documents are created. You can now copy them into their final resting place. Please also copy into the same directory the final configuration file you used (with all modifications) so everybody else in the future can benefit from your experience.
Written and Compiled by Ben Aldred
All documents are the responsibility of, and copyright, © their authors and do not represent the views of The Parallel Computer Centre, nor of The Queen's University of Belfast.
Maintained by Alan Rea, email A.Rea@qub.ac.uk