Quote:
Originally Posted by theducks
Seeing the Images have unrecognisable generic names 
Make them meaningful (eg. ..\Images\chapter_1), hopefully using the great Bulk renamer Meme built.
(Sigil adjusts the references )
Now that is done,
REGEX time
Code fragments
your search term: will include:
<h1 class="calibre8" id="calibre_pb_(\d+)">
Images\\chapter (\d+) <- note the SECOND forward reference
You are going to replace
<h1 class="calibre8" title=" Chapter \2" > The Bold is what will be in the TOC
and repair the captured text
Images\chapter \2
I just threw away the id tag as Sigil's TOC generator will make a new one if missing
|
If you have books that come from Calibre and your book has other images scattered around, you could have a problem.
Calibre assigns a starting image number and increments as it goes. So,you could have a chapter 5 (00005.jpg) image followed by a photo image (00006.jpg) followed by a chapter 6 (00007.jpg) image. This sequence would put a photo to depict chapter 6 and all after would be off.
This works just fine if the chapters are in strict sequential order. You needn't ask how I know.
Regards - John