Tool to auto-generate table of contents for a SRFI Lassi Kortela (07 Oct 2019 11:11 UTC)
Re: Tool to auto-generate table of contents for a SRFI Arthur A. Gleckler (07 Oct 2019 15:24 UTC)

Tool to auto-generate table of contents for a SRFI Lassi Kortela 07 Oct 2019 11:11 UTC

https://github.com/srfi-explorations/srfi-from-asciidoc/blob/master/srfi-table-of-contents.scm

- Scans the given HTML file for <h2>..<h4> headings.
- Drops "title", "author", "status", "abstract", "table of contents".
- Generates <h2 id="_foo_bar_baz"> attributes for the headings.
- Writes the table of contents as nested <ul> lists to stdout.
- Finally writes a list of all the IDs for manual copy-pasting.