![]() |
#1 |
Member
![]() 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? |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 39,095
Karma: 153098470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,075
Karma: 5450184
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.
|
![]() |
![]() |
![]() |
#5 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
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. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() 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. |
![]() |
![]() |
![]() |
#7 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,075
Karma: 5450184
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.
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,865
Karma: 198099188
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.
|
![]() |
![]() |
![]() |
#9 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
Though it should open and parse, the styles will be screwed up. E.g. what should be bold might be underlined or blue or.... |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |