View Full Version : Multiple html to epub conversion.


Barthelemy
03-29-2010, 05:47 AM
Hi!

I have a collection of books consisted of html files (one file for every page), the structure is like:

-book_name[folder]:
-start_here.html
-files[folder]:
-img1.jpg
-cover.html.html
-page_i
-...
-page_xix
-page_1
-etc.

When you open start_here.html it opens cover.html and you can navigate to next pages through 'next page' and 'previous page' buttons.

I was trying to convert start_here.html to epub in calibre, but for some reasons it combines only cover.html and page files wirh roman numeration.

I have Adobe InDesign, but it requires xml file, so I would have to convert multiple-html files to xml file first...

I have read that I need opf file which lists every htmls in folder, but I don't know how to create it.

I am very newbie in these things, so If You could provide some assistance I would be very greatful.

Update 1: I have just put conents of files folder to zip archive and converted zip file to epub (default options) in calibre, resulting epub consisted of files: page_367, page_366, page_365, page_364, page_363, page_362, page_368, page_369, page_371, page_372 (in that order). These are last pages of the html book, I don't get the order of files too.

paulpeer
03-30-2010, 01:51 AM
Changing the order of chapters is very easy with Sigil. Just drag and drop the titles in the Book Browser. You can also add chapters if necessary (right click in the Text section).

Barthelemy
03-30-2010, 05:32 AM
Thank you for answer paulpeer

I have donloaded Sigil and combined html files by adding existing files in tetx section. I guess creating chapter breaks is not necessary (every page is a chapter in itself).

The epub file is about 2 MB and it takes some time to load it in firefox (EPUBReader), but when I access the file through bookmarks -> epub catalog, it loads instantly. I also converted 14 MB file and it takes even longer to load it when accessing through windows explorer, but It loads instantly through epub catalog.

Is there a way to speed up loading process, can the file be somehow optimized?

paulpeer
03-30-2010, 06:03 AM
I guess creating chapter breaks is not necessary (every page is a chapter in itself).
That's right.
Is there a way to speed up loading process, can the file be somehow optimized?
Difficult to say without seeing the book. I once had a similar problem, and the reason was a very huge CSS file full of unnecessary information. Often books made out of DOC files have lots of rubbish. You can check the CSS in the right pane of Sigil. Has it 10 or 20 entries? Quite normal. Has it a few hundred? Then the problem might be there. But as I said, I can only guess here.

eping
03-30-2010, 06:18 AM
Thank you for answer paulpeer

The epub file is about 2 MB and it takes some time to load it in firefox (EPUBReader), but when I access the file through bookmarks -> epub catalog, it loads instantly. I also converted 14 MB file and it takes even longer to load it when accessing through windows explorer, but It loads instantly through epub catalog.

Is there a way to speed up loading process, can the file be somehow optimized?

epub is a zipped format.
ePubReader will unzip the ePub file and load it in Firefox.
So the first time is slow. Then with the unzipped files and browser's cache
it can be shown much faster.