PDA

View Full Version : source file to HTML...



Bleech
11-21-2006, 02:17 AM
I am just wondering if anyone here knows of a good free source code file to HTML "converter" like program.

incase this sounds weird to you, I will tell you what I mean.

I am looking for something that can input a C or C++ source file into that will output an HTML version of the file. this HTML version would highlight things like keywords with the same color MSVC++ highlights them with (blue), and perform related enhancing of the source code to make it look just like it would in the MSVC editor.

I know I could do this manually, but I don't know much HTML, and even if I did it would be a tedious task with large programs. I also know that I could write my own program to do this, but that would be hard with my basic knowledge of HTML.

I'm sure some people here have used something like this before, and some may have even wrote their own. could anyone please recommend one of these for me?


thank you in advance. :)

newtocpp
11-21-2006, 03:00 AM
Most C/C++ IDEs like devcpp or codeblocks can do this for you.

Prelude
11-21-2006, 09:21 AM
>I am just wondering if anyone here knows of a good free source code file to HTML "converter" like program.
I use one for the source code on my website, but it's quick and dirty, and tailored to the style sheets. I'll see if I can find the source for it.

QuestionC
11-21-2006, 09:56 AM
It sounds like you're describing Doxygen.
http://www.stack.nl/~dimitri/doxygen/index.html

It's generally geared forgenerating documented code, but you can have it just spit up highlighted source files. A simple example:
www.questionc.com/dox/html/

bithub
11-21-2006, 10:43 AM
code2html (http://www.palfrader.org/code2html/)

dwks
11-21-2006, 01:27 PM
http://cboard.cprogramming.com/showthread.php?t=82592