View Single Post
Old 06-07-2021, 08:20 PM   #12
retiredbiker
Addict
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 384
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Quote:
only "Begin Reading" with one ridiculously long file
I too dislike books like that, and my Forma dislikes them even more. If you have one huge file, the thing to do is open the book in the editor and split it up. Use the file split tool, located under the preview pane.

In your case it is easy, since you have those "<p class="page-break"></p>" lines where you want to split the file. Use that as a search term, go through the big file, and split at each one. Then use the ToC editor, and tell it to generate a ToC "from files". If you have reasonable headers at each chapter - first line of text, actually, it will use those to title the chapters. Some experimentation will show you how it goes, it's pretty easy.

Then search out and get rid of those page-break lines.

You could also do it in one go, using "Split at multiple locations" tool. Open that big file in the Editor and right-click anywhere in the code pane to get to the tool. Then use the wizard to make your X-path expression. You would use:
Tag name=p
attribute=class
value=page-break
in the wizard, then just click OK with the resulting expression. Caution: like any powerful tool, this can give you unexpected results, so know what is in that file in some detail before letting it rip.

Last edited by retiredbiker; 06-07-2021 at 08:29 PM.
retiredbiker is offline   Reply With Quote