I have a directory which contains some documentation. At the top level there's a single file (index.html) which contains a full table of contents:

Front Matter
Contents
1. Introduction
2. Built-in Objects
2.1 Built-in Functions

Each sub-section is then split out into its own .html file (ie, there's a file corresponding to 2, another file corresponding to 2.1, another for 2.1.1).

I want to merge this all into one gigantic .html file, keeping the ordering the same as what's in the TOC (so if I scroll down through the page, section 2 immediately follows section 1, and is immediately followed by section 2.1).

Are there pre-built tools that do this? I use both OS X and Ubuntu, but something cross-platform (ideally, written in Python) would be preferred.

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

I don't know of a tool to do that. I'd write a script in Python using the SGML parser module.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.