Syntax Coloring
Traduction: [ Google | Babelfish ]
Catégories : [ Informatique ]
I had a dream last night, where I added automatic syntax coloring to the source code files that can be found on my website. These are currenty simply put in directories and accessible through the web server, and colors would make them more readable (I'm not sure anyone is reading those, but who cares).
The idea would be to use Apache's URL rewrite engine to serve a CGI/PHP/something page that reads the source code and spits out an HTML version with colors and whatnot.
I just found GeSHi, a tool written in PHP that does exactly that. It shouldn't be too difficult to implement.
I followed my dream, and I wrote the Automatic Transparent Syntax HIghlighting software.
The basic idea is to use Apache's internal file indexing to show the directory structure, but when the user requests a file of a known type, atshi.php is called to d...