TobyInkster.co.uk

html2highlight

html2highlight is a a script that converts an HTML or any other XML-like SGML document into a HTML page showing the document's source code with naïve syntax highlighting. The output document requires a CSS-capable browser.

The colours for the syntax highlighting are inspired by Mozilla's "View Source" function.

Although it is a Perl script, it is reasonably efficient. It typically takes about 1 minute to convert a 100KB document on my 400MHz Pentium Celery with 256MB RAM. Output documents are about 2 to 5 times the size of the original.

Examples

Download

html2highlight 0.01.

Syntax

perl html2highlight.pl http://example.com/example.html > output.html

Requires

Perl, Lynx.

Google Search

Article Details

Author:Toby Inkster
Licence:All rights reserved
Created:Tue, 10 May 2005
Modified:Fri, 6 Apr 2007
Status:Archived
Permalink:Permalink

Blogroll

Here are some other sites. Some might be good; some might be rubbish. You decide.