Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-07-2019, 07:21 PM   #1
joebob2a
Member
joebob2a began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jun 2019
Device: epub
Consolidating HTML files in epub?

I'm new here. Thanks for a marvelous tool!

I've pushed a book from PDF into Sigil and I've been cleaning things up. I just have one nit: There are in some cases dozens of separate HTML files for each chapter. I tried Merging them within Sigil and my e-reader choked saying the file was corrupt. I tried manually copying the HTML inside of Sigil and got the same result. This isn't a show-stopper, but it would just make things easier to manage. Any ideas?
joebob2a is offline   Reply With Quote
Old 06-07-2019, 08:48 PM   #2
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Oops; I misread and skimmed over that you have several files per chapter.

Last edited by lumpynose; 06-07-2019 at 10:19 PM.
lumpynose is offline   Reply With Quote
Advert
Old 06-07-2019, 09:27 PM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by joebob2a View Post
I'm new here. Thanks for a marvelous tool!

I've pushed a book from PDF into Sigil and I've been cleaning things up. I just have one nit: There are in some cases dozens of separate HTML files for each chapter. I tried Merging them within Sigil and my e-reader choked saying the file was corrupt. I tried manually copying the HTML inside of Sigil and got the same result. This isn't a show-stopper, but it would just make things easier to manage. Any ideas?
What does error-checking the files before merging them show? FlightCrew and epubcheck for epub2, epubcheck alone for epub3. AFAIR, Sigil will not merge files that have errors the builtin error check detects but that is a pretty simplistic check.
DNSB is offline   Reply With Quote
Old 06-07-2019, 10:08 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Make a backup copy of the epub then run Mend on all of the html files at one time to fix any parsing issues. Then you should be able to merge and split.
KevinH is offline   Reply With Quote
Old 06-08-2019, 12:19 AM   #5
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by joebob2a View Post
I tried Merging them within Sigil and my e-reader choked saying the file was corrupt.
You need a more specific error report

First try the built-in "Well formed check" on the Tools menu, or F7.
It will open a window listing errors and if you click on the error it will open the offending file at the line it found the error.
Often this is enough to find an error severe enough to choke a reader, though the errors can be cryptic. Try Googling the error message if you don't understand it and see some examples.

You should also use epubcheck for a comprehensive and sometimes nitpicking examination.
You can do it by submitting the epub to http://validator.idpf.org/
But better to install the plugin so you can do it inside Sigil, then its error report is linked to the code as the F7 check.

Otherwise, one thing that might be causing problems is if styles are defined in the header of each HTML file, rather than a separate CSS file.

That can cause conflict when they are merged if each file uses the same style names but with different definitions, as often happens with automatic conversions.

I found that Calibre can fix this: do an epub to epub conversion and it will pull all the locally defined styles into one CSS file with unique names.
The CSS will be pretty silly, with many similar or identical styles with different names, but it will work and you can make them more orderly in Sigil.

Last edited by AlanHK; 06-08-2019 at 12:28 AM.
AlanHK is offline   Reply With Quote
Advert
Old 06-10-2019, 02:31 AM   #6
joebob2a
Member
joebob2a began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jun 2019
Device: epub
Thanks for all the answers!

The F7 check says "No Trouble Found."

Running the EPUB Validator from the web yielded dozens of errors. I installed the plugin but it exits after reading for a bit. Is that output logged? It appears that some messages appear just before the window closes.

I have the epub document in an online Google drive. When I open it with an e-reader, it asks if I want to upload the file to Google Play Books. I say yes, and my tablet downloads the copy, but it hangs on "Processing" and eventually times out. This happens even if I just merge the first chapter, which is only 27 KB if I open the epub as a zip archive. The file remains perfectly readable in Sigil, but not by an ebook reader.

Ultimately, this may not be all that important -- I'm willing to let good enough be good enough, but I want to know what kinds of pitfalls may be near.
joebob2a is offline   Reply With Quote
Old 06-10-2019, 07:47 AM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Run Mend Not F7. F7 is just a rough "will it parse?". Running Mend will fix whatever is wrong and allow you to merge xhtml files if you so desire.
KevinH is offline   Reply With Quote
Old 06-10-2019, 08:32 AM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
The only merge/split problem Mend won't be able to overcome is the Missing Target (urls with nonexistent target IDs/frags). But that's just a warning that can be dismissed if the consequences of potentially broken links is acceptable. Keep in mind that that particular warning is issued precisely BECAUSE splitting/merging files under such conditions can create new errors.
DiapDealer is offline   Reply With Quote
Old 06-14-2019, 12:22 AM   #9
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by DiapDealer View Post
The only merge/split problem Mend won't be able to overcome is the Missing Target.
Also as I mentioned, when styles are defined in the individual file headers with conflicting definitions.
Though it should open and parse, the styles will be screwed up. E.g. what should be bold might be underlined or blue or....
AlanHK is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Several Html and Css files into one Epub File? MarjaE Editor 3 04-04-2017 03:20 PM
Split an EPUB into more HTML files 1v4n0 Sigil 7 10-24-2015 12:57 PM
How to convert these html files to ePub? Valkrider Conversion 5 06-07-2015 07:48 AM
Converting multiple HTML files into one EPUB file bigdukesix ePub 3 03-08-2011 12:12 PM
Does splitting EPUB among more HTML files improve Performance? purcelljf ePub 2 10-01-2010 01:15 AM


All times are GMT -4. The time now is 04:26 AM.


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