
Html::gentoc generates anchors and a table of contents for html documents. depending on the arguments, it will insert the information it generates, or output to a string, a separate file or stdout.
while it defaults to taking h1 and h2 elements as the significant elements to put into the table of contents, any tag can be defined as a significant element. also, it doesn't matter if the input html code is complete, pure html, one can input pseudo-html or page-fragments, which makes it suitable for using on templates and html meta-languages such as wml.
also included in the distrubution is hypertoc, a script which uses the module so that one can process files on the command-line in a user-friendly manner.