John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
Many years ago, I wrote a small Perl program that scans a hand-written HTML file and generates/updates a table of contents at the top of the file, with links to the various H\d tags.
That was fairly crude, being line-oriented and required that the header tags and matching names be just so. But it did recognise the stuff it generated before and replaced it with a refreshed copy.
I'd like something modern that does this. A proper HTML parser would take any HTML without relying on special formatting conventions or restrictions. The generated table of contents can have fancy dynamic-expanding/collapsing features.
Someone has got to have done this already! Where can I find it?
—John
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: HTML table-of-contents generator
by gjb (Vicar) on Jul 01, 2003 at 17:56 UTC | |
by PodMaster (Abbot) on Jul 01, 2003 at 19:33 UTC | |
by John M. Dlugosz (Monsignor) on Jul 02, 2003 at 04:43 UTC | |
Re: HTML table-of-contents generator
by tcf22 (Priest) on Jul 01, 2003 at 17:56 UTC | |
by John M. Dlugosz (Monsignor) on Jul 01, 2003 at 18:47 UTC | |
Re: HTML table-of-contents generator
by chunlou (Curate) on Jul 01, 2003 at 20:41 UTC |
Back to
Seekers of Perl Wisdom