MKINDEX.EXE is a utility for creating HTML indexes. The indexes are based on the content of two files: a profile file that specifies header and footer information, paths and extensions for the hypertext links, and the title to use for each index; and a data file that specifies the index file, the hypertext linked file, the hypertext display test, and descriptive text.
MKINDEX.EXE INFILE.TXT -pPROFILE.PAR -? Where: INFILE.TXT = Name of Data File consisting of 4 columns of data -pPROFILE.PAR = Name of Profile File -? = Provides the syntax for using mkindex.exe
! The format of the PROFILE.PAR is: ! ! [header] ! Text to print at the top of each INDEX_FILE ! HTML tags can be embedded in this text. ! ! The following fields are defined and can be included anywhere in ! in the header (or footer) section: ! ! &FILENAME is replaced with the filename INDEX_FILE ! without its path or extension. ! &FILEDATE is replaced with the current date in DD-MMM-YY format ! &FILETIME is replaced with the current time in HH:MM:SS format ! ! [footer] ! Text to print at the bottom of each INDEX_FILE ! The same fields as in the header can be used ! ! [commands] ! Title Text to be used for the title of the INDEX_FILE, fields can be used ! Link_Extension .htm ! Link_Path data/ ! ! [EOF] ! All lines after the EOF section are ignored3.1 Title Index
3.2 Link_Extension .HTM
The extension specified (.HTM) is appended to the DATA_FILE filename specified in the Data File. Up to 4 characters can be specified.
3.3 Link_Path data/
The path specified (data/) is added to the beginning of the DATA_FILE filename specified in the Data File.
The format of the INFILE.TXT is:
Four columns separated by a space or tab:
column 1: INDEX_FILE: The name of the index file to write this entry in column 2: DATA_FILE: The hypertext link for this entry column 3: LINK_TEXT: The text to print for the hypertext link column 4: INDEX_TEXT: Text to print after the DATA_FILE hypertext link.
This field is the name of the index file (without the .htm extension) that the index entry is to be part of. This field may not contain any embedded spaces or tabs.
This field is the name of the file that the hypertext link will link to in the index file specified by INDEX_FILE. The value of this field is preceded with the Link_Path and suffixed with the Link_Extension specified in the Profile File. This field may not contain any embedded spaces or tabs.
This field contains the text displayed for the hypertext link in the index file specified by INDEX_FILE. This field may not contain any embedded spaces or tabs.
This field contains text to be displayed after LINK_TEXT in the index file specified by INDEX_FILE. This is the only field that may contain embedded spaces and tabs.
5.1 Additional Command Line Arguments
MKINDEX.EXE INFILE.TXT -pPROFILE.PAR -? -d Where: INFILE.TXT = Name of Data File consisting of 4 columns of data -pPROFILE.PAR = Name of Profile File -? = Provides the syntax for using mkindex.exe -d = Set the DEBUG flag to print out internal variables of the program. Used to find programming errors in MKINDEX.EXE5.2 This program was written assuming filenames conformed to the old DOS 8.3 format. Long Filenames (filenames greater than 8 characters, or with extensions greater than 3 characters) are currently not supported.
The following is a simple example of how to use MKINDEX.EXE:
PROFILE File TEST.PAR:
! TEST.PAR ! All lines starting with ! are ignored [header] <H2> &FILENAME </H2> <PRE> ! [footer] </PRE> <I> Index Created: &FILEDATE &FILETIME </I> ! [commands] Title &FILENAME Link_Extension .htm Link_Path data/ ! [EOF]
DATA File TEST.TXT:
index_1 file1 FILE1 This is the first File index_2 file2 FILE2 This is the second File index_3 file3 FILE3 This is the third File index_1 file4 FILE4 This is the fourth File index_2 file5 FILE5 This is the fifth File index_2 file6 FILE6 This is the sixth File index_3 file7 FILE7 This is the seventh File index_1 file8 FILE8 This is the eighth File index_1 file9 FILE9 This is the ninth File
The following Files are Assumed to already exist:
data/file1.htm data/file2.htm data/file3.htm data/file4.htm data/file5.htm data/file6.htm data/file7.htm data/file8.htm data/file9.htm
The following command should be used to create the index files:
mkindex TEST.TXT -pTEST.PAR
This will result in the generation of 3 files: index_1.htm, index_2.htm, and index_3.htm
index_1.htm will appear as follows:
FILE1 This is the first File FILE4 This is the fourth File FILE8 This is the eighth File FILE9 This is the ninth File
Index Created: 17-Feb-97 20:37:46
The files index_2.htm and index_3.htm will be similar
The following is another example of how to use MKINDEX.EXE:
mkindex -ptest2.par test2.txtwhich results in the following three index files:
A.htm B.htm C.htm