4

Is there a command-line tool, preferably available on both Windows and Linux, which will take a source code file as input, and generate the corresponding syntax-coloured HTML code ?

I'm looking for functionality similar to vim's TOhtml command, but which I could run from the command line, without having to open vim.

1 Answer 1

6

Highlight is pretty much exactly what you're looking for:

Highlight converts sourcecode to HTML, XHTML, RTF, LaTeX, TeX, SVG, BBCode and terminal escape sequences with coloured syntax highlighting. Language definitions and colour themes are customizable.

The website has downloads for Windows (cli & gui) and packages for various Linux/BSD distros.

1
  • yep, perfect match; thanx ! Nov 28, 2011 at 19:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .