View Single Post
Old 03-24-2012, 08:12 AM   #5
Jabby
Jr. - Junior Member
Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.
 
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
Quote:
Originally Posted by cybmole View Post
I have a book in which images have been used as chapter headers - each chapter has a unique image.

the chapter header code looks like this
Code:
<h1 class="calibre8" id="calibre_pb_13"><span class="calibre9"><a class="calibre10"></a><img alt="" class="calibre11" src="../Images/record-522.jpg" /></span></h1>
the image name changes for each chapter, and the actual chapter number has been embedded into each image.
the id ="calibre_pb-nn" changes its value but nn increments 2 at a time & starts at 09 so would be tricky to extract & adjust that

I cannot think of any way to auto-generate a workable TOC from this - is there one ?
I could manually add text to each chapter header but that would take a long time.
There are probable more elegant ways to do this, but I would try this:
Find <h1
Replace with <h1 title="Chapter 1"
For me, it beats copying the above to the clipboard and then pasting it one at a time.

You still have to fix the chapter count one-by-one..

Regards - John
Jabby is offline   Reply With Quote