View Single Post
Old 12-28-2012, 05:52 AM   #8
wobohohoho began at the beginning.
wobohohoho's Avatar
Posts: 15
Karma: 10
Join Date: Dec 2012
Location: KL, Malaysia
Device: Freda (WP 7.8) EPUB reader app
I have a somewhat similar problem. I have in excess of 500 htm files from a decompiled CHM (for just one book, but a few have the same problem):

1.that have individual sub-chapters as different htm files in different folders to denote main chapters (numbered 1 to 12)
2.the original CHM creators never bothered heading their documents, so there is no way to generate a TOC in the first place

Since we can't use folders in Sigil, or EPUB for that matter to distinguish the loads of htm files, I would have to batch rename files to match their main chapters as there a few that are the same (e.g. Introduction) (which I'm okay with).

Finding and replacing tags through all selected html files seems the way to go to create a TOC. But the suitable tag I could find is, for example, below:

    <div id="printheader_crumbtrail">
      &gt; Front of Book &gt; Conflicts of interest: none declared

Question is, how do I find and replace these tags (or what regex do I use)?

Or maybe other ways?
wobohohoho is offline   Reply With Quote