View Single Post
Old 10-10-2018, 08:44 PM   #9
XRaySpeX
Member
XRaySpeX began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Dec 2010
Location: Reading, UK
Device: Kindle 3 3G
I've given up on what I set out to do. From day 1 I was able to produce a full ToC with just the Chapter nos from my .AZW using the Calibre Converter with default settings. But after spending some days on this & trying everything I could see I got no futher forward. It's a crazy program!
  1. I soon discovered that the Converter contains a Search & Replace (S&R) function. So there was no need to use the Editor. But even using that did not replace with the desired code.

    For example, your <h3> replacement ended up as:

    <p class="calibre_36"><font size="4"><span class="bold">(Chapter .+?)&nbsp</span></font><br/><font size="4"><span class="bold">(- .+?)</span></font></p>

    Also whatever S&R I did the ToC ended up as as empty ToC with just its heading "Table of Contents".
  2. As I said I was able to produce a full ToC with just the Chapter nos from my .AZW containing the code:

    <p class="calibre_12"><font size="4"><span class="bold">(Chapter .+?)</span></font></p><p class="calibre_12">(- .+?)</p>

    using only default settings but when I attempted to merge the 2 lines Chapter & Title into 1 by S&Ring the above into:

    <p class="calibre_12"><font size="4"><span class="bold">\1&nbsp\2</span></font></p>

    I ended up with a .MOBI file contaning the code:

    <p class="calibre_14"><font size="4"><span class="bold">(Chapter .+?)&nbsp(-.+?)</span></font></p>

    but still with an empty ToC. Then when I tried to use the Converter on that .MOBI using only default settings I still ended up with an empty ToC.

    How can the Converter produce different results when using only default settings on 2 seemingly similar codes:

    <p class="calibre_12"><font size="4"><span class="bold">(Chapter .+?)</span></font></p><p class="calibre_12">(- .+?)</p>
    vs.
    <p class="calibre_14"><font size="4"><span class="bold">(Chapter .+?)&nbsp(-.+?)</span></font></p>

    ? It doesn't make sense!
  3. Perhaps the ToC tool needs some manual assistance? Can you suggest a ToC XPath expression to id:

    <p class="calibre_14"><font size="4"><span class="bold">(Chapter .+?)&nbsp(-.+?)</span></font></p>

    as a Chapter heading?
I've learnt a lot about the Calibre Converter in the last few days thanks to you but it seems I might never put it into use. Thanks
XRaySpeX is offline   Reply With Quote