Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 10-18-2020, 01:26 AM   #1
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Chapter detection for azw3 to <anything>

Hi folks,

I've got a number of books from Amazon recently where each chapter has two heading tags which results in the default calibre conversion splitting the first part of a new chapter title into its own page and the second part on the next page with the rest of the chapter text. This is an example of the html:

Code:
    <div class="heading heading-with-title heading-without-image" id="chapter-1-heading" aid="3Q282">
      <div class="heading-contents" aid="3Q283">
        <div class="title-subtitle-block title-block-with-element-number" aid="3Q284">
          <div class="element-number-block" aid="3Q285">
            <h2 class="element-number" aid="3Q286">1</h2>
          </div>
          <div class="title-block" aid="3Q287">
            <h1 class="title" aid="3Q288">Descent</h1>
          </div>
        </div>
      </div>
    </div>
I know I can tinker with the "Detect chapters" XPath stuff in the structure detection options in the coversion dialogs, but I was wondering if the default XPath could be made smarter somehow to pick these cases up. I don't XPath enough to know if this is possible.

The attached zip files contains an example from "Colony Mars One" extracted with mobiunpack and reduced to just a simple example that shows the problem when run with ebook-convert.exe .
Attached Files
File Type: zip mars.zip (874 Bytes, 202 views)
snarkophilus is offline   Reply With Quote
Old 10-18-2020, 03:05 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,255
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, not really, this would require heuristics and examining the source tree, which XPath does not support.
kovidgoyal is online now   Reply With Quote
Advert
Old 10-18-2020, 05:06 AM   #3
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
No worries, not the world's biggest problem! Thanks for answering.
snarkophilus is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with chapter detection morgon Conversion 2 03-25-2016 11:14 PM
Help with Chapter detection ubergeeksov Calibre 0 09-02-2010 04:56 AM
Chapter detection for LRF HenryP Calibre 12 04-03-2009 08:22 AM
Cant find help for chapter detection fallwood Calibre 6 12-10-2008 01:20 PM
Calibre chapter detection AKninja04 Calibre 5 09-14-2008 12:09 PM


All times are GMT -4. The time now is 06:50 AM.


MobileRead.com is a privately owned, operated and funded community.