Download: working files
Source-highlight is a command line program that, given a source file, produces a document with syntax highlighting.
To use the program, copy the working files into your
bin directory. Unpack the zip file Src-Hilite to
C;\Program Files, keeping the same directory structure. The binary code will
look for language files there (C;\Program Files\Src-Hilite\share).
The file sourcehilite.bat, shown below,
source-highlight -i %1 -o %1.html
provides easy access to the program. For example, to use
the bat script on the file wrap.cpp enter
sourcehilite wrap.cpp
The output file would be wrap.cpp.html
To add line numbers, change the command (or bat file)
to
source-highlight -n -i %1 -o %1.html
The file hilite.bat pipes the output of
source-highlight through the program wrap which
adds a HTML header and trailer to the output. You could
customize that for your own use.
Author: Lorenzo Bettini
http://www.gnu.org/software/src-highlite/
An MS-Windows port of Source-highlight is available from http://gnuwin32.sourceforge.net/.
Maintained by John Loomis, last updated 4 Feb 2009