Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
yep, perfect match; thanx ! –  Mihai Rotaru Nov 28 '11 at 19:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.