Re: Pretty print HTML?

Charlie Stross (charles@fma.com)
Wed, 23 Oct 1996 15:24:19 +0100


> In message <326B854E.3E8E@eto.ericsson.se>, "Ole Morten Oian (tlf. 41730)" writes:
> > I've just upgraded from version 5b6 to 5.03 of libwww perl, and I miss
> > the pretty-printing $html->asHTML did.
> 
> So do I :-)
    :
> Contributions are appreciated...

I've got something. It's a bit rough and it _doesn't_ handle all cases or
work in an OO manner and probably isn't fit to be let out in public on its
own, but it pretty-prints HTML (using the old HTML::Parser interface). Only
known defect is that it screws up on PRE blocks; so there's a companion
script that bursts preformatted blocks out into separate files and inserts
MetaHTML tags to import them -- you should be able to fix this into something
a bit less eccentric fairly easily.   

See:

http://www.antipope.demon.co.uk/charlie/webbook/essays/toolkit.html

for details and source (to this and other assorted junk).


-- Charlie Stross