![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
HTML-Conversion
I have a little problem with converting some Openbook documents that includes many html-Files with a lot of internal links between the files. I import each Openbook as zip-file in Calibre. The files are sorted by name and this is as well the reading order. (Picture 1)
I recognize after converting the files into EPUB that the order of the single html files change to a wrong reading order. I open this file in Sigil to show what happens. (Picture 2) Is it possible to integrate something like a switch into the Zip to EPUB conversion dialog where I can tell Calibre to interpret the reading order by filenames sort order? Or is there somewhere else a setup to handle this within Calibre, perhaps like a tweak? Changing the filenames isn’t an option because of the huge amount on internal links. I can do the job with Sigil but I like to do it in Calibre too ![]() |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
The way that keeps Calibre happy is to create a simple top-level HTML document that pulls in all the files at the next level in the correct order. You then add this html file you have just created (rather than the individual files) and Calibre will add them all to the ZIP it crates but now the top level file is used to keep the remainder in the correct order.
This works without the need for any changes to Calibre as it is today. |
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
Yes, I agree. This is a way I can go.
On the other hand, why not using a file sort order as default fallback, if there is no top-level HTML document available? Without any additional setting. Only a guess, because I believe, if there is an html-export, it will be organize for reading order mostly with a file order structure. Maybe Kovid can think about this some when in a future update. The initial idea behind the request was, making an example using Calibre only. I did the import with an index.html, what include a very detailed ToC but w/o an explicit top-level HTML document. I was surprised after I saw the result and my first thought was, I did something wrong. ![]() |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Did you add the index.html file to Calibre, or put it into a ZIP file and add that? If you added the index.html file then Calibre should have used that to create its own ZIP file and pull all the linked files in so that they will be used in the order specified in the index.
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,198
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
Sorry, for coming back so late.
First of all, thanks for your tips, Kovid and itimpi. I play around the different possibilities and had success in both ways. At the end Kovid's hint to the special note was the eye opener, I was looking for. Sometimes it is realy tricky to find the right information in the helpfile (I am using it quite often). I had after deleting the old book and import of the index.html a new zip file, which is after converting to an epub in the correct reading order. Now I will play a bit with the toc generation and have at the end of the day hopefully a nice sample project for Calibre ![]() ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
html to epub CLI conversion / html input | m4mmon | Conversion | 2 | 05-05-2012 02:10 AM |
Problem with html -> Mobi conversion - html tags visible. | khromov | Calibre | 9 | 08-06-2011 11:25 AM |
HTML Conversion | yoss15 | Conversion | 12 | 07-28-2011 04:42 PM |
Help with HTML to ePub conversion...? | Nethfel | Calibre | 4 | 05-10-2010 02:26 PM |
conversion TO html | in_the_fade | Calibre | 4 | 04-29-2010 10:51 AM |