Generating Collections of Linked Web Pages


Up: Man Pages for Hypertext Documents Next: Alternate Formatting for HTML Previous: Man Pages for Hypertext Documents

To generate HTML man pages for a collection of source files in /home/me/foo, do the following:

cd 

mkdir www 

mkdir www/man3 

cd foo 

doctext -html -index ../foo.cit \ 
        -indexdir http://www.mcs.anl.gov/me/foo/www/man3 \ 
        -mpath ../www/man3 *.[ch] 

cd .. 

This puts the HTML files into the directory www/man3 and the index (in the correct format for the -mapman option of tohtml) into the file foo.cit. The -indexdir option is used to specify the ultimate location for the files (in this case, the directory me/foo/www/man3 at the Web site www.mcs.anl.gov). Once you are sure that the files are correct, you can move them into the Web area with
 

cp -r www /mcs/www/home/me 

(assuming that /mcs/www corresponds to http://www.mcs.anl.gov in the -indexdir argument).

To generate an HTML listing of the routines, you can execute the following script, with, of course, the appropriate changes to the text:

#! /bin/sh 

echo '<TITLE>Web pages for My Routines</TITLE>' >> www/index.html 

echo '<H1>Web pages for My Routines</H1>' >> www/index.html 

echo '<H2>My Routines</H2>'  >> www/index.html 

echo '<MENU>' >> www/index.html 

ls -1 www/man3 | \ 
    sed -e 's%^\(.*\).html$%<LI><A HREF="man3/\1.html">\1</A>%g' \ 
        >> www/index.html 

echo '</MENU>' >> www/index.html 

This example may be found in the file mkhtml.sam in the source directory for doctext.

If you have only a few routines to document, you can dispense with the second directory level above (the man3). However, you might find it valuable to follow (at least loosely) the Unix man page format, with commands and installation instructions in man1 and routines spread across man2 through man8.



Up: Man Pages for Hypertext Documents Next: Alternate Formatting for HTML Previous: Man Pages for Hypertext Documents