Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-07-2017, 06:28 AM   #1
Trigun
Connoisseur
Trigun began at the beginning.
 
Posts: 98
Karma: 10
Join Date: Oct 2014
Device: kindle pw3
html to epub and chap detection

hello
i use the tool ebook-convert for convert a html file in a epub
in my html file i have
Code:
<mbp:pagebreak /><mbp:section>
at the end of each chapter but after the convert i lose the chap division.... how i can prevent it?


Code:
[..] </div> 
</div><mbp:pagebreak /><mbp:section><header></header> 
<div class="entry-content"> 
 <div id="chapterContent" class="innerContent fr-view"> 
  <p dir="ltr">Chapter [..]

i use :
ebook-convert "something.html" "something.mobi"

PS the format of the chapter isn't always the same but the pagebreak and section is always at the end of the chapter
sometimes the chapter is in a <h2> tag and is detected, but i don't have a standard

Last edited by Trigun; 02-07-2017 at 06:33 AM.
Trigun is offline   Reply With Quote
Old 02-07-2017, 09:00 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,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
<mbpagebreak> is not valid html. Use the search and replace options to remove it and use the structure detection options to detect the chapter headings
kovidgoyal is online now   Reply With Quote
Advert
Old 02-07-2017, 09:13 AM   #3
Trigun
Connoisseur
Trigun began at the beginning.
 
Posts: 98
Karma: 10
Join Date: Oct 2014
Device: kindle pw3
i know where the chapter start (i merge different urls in a single html and after convert it to mobi)
i'm the one who add that tag for separate the chapters but i don't know the structure of the text inside of the urls
sometimes the url is formatted with h2 title
sometimes is different and when that happens i don't have the chapter end (i don't care about the title of the chap but atleast i want a division from the previous chapter)
how i can do that?

i can add a h2 title too instead of the mbp pagebreak
but in that case if the text have already a h2 title i have double chapter

Last edited by Trigun; 02-07-2017 at 09:19 AM.
Trigun is offline   Reply With Quote
Old 02-07-2017, 11:33 AM   #4
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
If you know the mbp pagebreak tags are all already in the right places, you could try search/replacing all the mbp pagebreak tags with something like <h6></h6> (if your text doesn't contain any other h6 tags). Then use calibre to split on h6 tags. Finally remove the empty h6 pairs. Crude but functional.
jackie_w is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
azw3 to epub - structure detection bug ? cybmole Conversion 6 02-02-2014 07:24 PM
Underline disappearing for Chap headings oldghost Conversion 4 04-22-2012 04:37 PM
Epub to Mobi Chapter Detection ice2097 Calibre 4 12-29-2010 02:14 AM
epub - force a 2nd pass to improve structure detection ? cybmole Calibre 10 10-08-2010 01:00 AM
To MOBI, Chapter detection fails? Works for EPUB Fmstrat Calibre 7 08-29-2010 05:37 PM


All times are GMT -4. The time now is 09:36 AM.


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