Download it here.
This Perl script converts a DOS batch file to HTML.
It also works with Config.sys like files and Windows-style .ini files.
Version 1.0 - March, 13 1998.
Here is a sample source batch file and the output file, that use a style sheet. The command line was :
bat2html.pl -title AutoExec.bat -stylesheet
../../gta/gta.css <autoexec.bat
>autoexec.html
bat2html.pl use HTML 4.0 and CSS for formatting, but you can easily modify
this behavior in the code.
CSS styles are :
REM {SPAN Style="color: blue;"}This text is blue.{/SPAN}
REM {FONT Color="blue"}This is old-style blue text.{/FONT}
REM Copyright © 1998 {A HRef="mailto:%64%6F%6C%6d%65%6E%40%62%69%67%66%6F%6F%74%2E%63%6F%6d"}Olivier Mengué{/A}
REM {!-- This text will not appear in the HTML --}
& is not escaped in comment lines.
The script file is a DOS file (CRLF at end of lines), but who cares DOS batch files on UNIX or Mac?
TODO: escape diacritics for code page 437.
Go to my home page and have a look at my others productions.