![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2011
Device: Kindle 2
|
HTML out of order
Hi:
I'm trying to produce a MOBI book with Calibre from a complex website that's set up to be read online, and I'm getting really frustrated. I just can't get the html files to process in the right order. The book is in sections and after processing the first few intro pages it starts processing the main book sections with section 100.00. It does everything up to then in the right order, however instead of going to section 101.00 it jumps to section 250.00. Then it jumps to section 1044.13 then back to 982.20 then back to 613.00 then back to 450.00 then forward to 800.00, etc., etc.. The html documents for the sections are stored in separate sub-folders so all of the numbered sections from 100.00 up to 200.00 (not including the latter number) are in subfolder s01. These are labelled p0000.html, p0100.html, p2000.html, p3000.html, and so forth. Then all the sections from 200.00 to 300.00 are in subfolder s02, etc.. This goes up to s12 for sections in the 1200.00 to 1300.00 range. When I'm navigating in the Firefox browser or even in the MOBI document reader I can click on the hypertext in the TOC to take me to the right section of the book every time, but I can't read it in sequence in the MOBI or Kindle by just scrolling because the sections are in the order they were processes. It seems to jump all over the place. There's also a "next page" button at the bottom of every section page, and if I read the section and then click on "next section" it goes to the right place every time, even in the MOBI reader. However, scrolling doesn't work and I wanted to get rid of the section buttons anyway. I've tried everything to get it to process in the right order including making up my own TOC using very simple HTML but it just won't do it. I'm using all of the default settings for the MOBI conversion. Any ideas how I can get this scripted in the correct order? Once I do that I can get rid of the unwanted buttons and so forth. It eventually processes section 101, so it's not leaving anything out. But it's about the 20th in the sequence and I can't even make sense of the pattern. Oy. |
![]() |
![]() |
![]() |
#2 |
Media Bloke
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,382
Karma: 113956855
Join Date: Sep 2010
Location: NSW - Australia
Device: iOS
|
Try this. Add all the HTML files into a zip file. Add it to calibre and convert the zip to ePub. Get the program called Sigil and open the ePub in Sigil. Rearrange the files into the order you want. And save. Add the saved file to calibre and convert it to mobi.
While you are in Sigil you can creat h2 and h2 headers to creat a TOC. Welcome to MR freewheeing. Did you forget your L? ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
I thought I remembered an option somewhere that affected the order in which links were followed in a multi-level HTML document. I cannot find it so I could be wrong about there being such an option. However if there is one it could well be relevant in the case described here.
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,342
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The option is available by customizing the HTML2ZIP plugin
|
![]() |
![]() |
![]() |
#5 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2011
Device: Kindle 2
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42
Karma: 13888
Join Date: Jun 2011
Device: Kindle
|
I believe this is a related question. I am pulling the project into Calibre by pointing to an HTML file that references all the source files, in order. Some of these files have references to footnotes, which appear in the last file listed. However, when I convert to MOBI, what appears to be happening is that the first file in the list is brought in, then the footnotes file (because there is a footnote in Chapter 1), then all files referenced in the footnotes file (all notes being linked back to the text), then finally all files that do not have footnotes, in order.
So Calibre seems to be pulling in the files as they are needed to resolve references, rather than in the order listed in the pseudo-TOC file, and they appear in the text and the generated TOC in the wrong order. P.S. I see now that this is "by design" and the option has to be changed in the HTML2ZIP plugin. Last edited by SkookumPete; 08-09-2011 at 03:15 PM. Reason: added info |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2011
Device: Kindle 2
|
Conversion no epub and then using Sigil to edit and then converting to mobi worked like ganbusters. Thanks for the suggestion! This book was so rife with graphics that I thought I'd never be able to convert it. BTW, the reason the html insisted on being out of order was that the original html scripts insisted on doing it that way for some reason. It worked fine on the web because the order didn't really matter. The only way you could navigate was by clicking "next page" or using the links in the Table of Contents. It was a chore getting them reordered, but it worked very well once I put in the time.
Having a different problem with another book that was web-based though. It was set up as a series of pdfs that were accessed using an html script, and again navigation was only by clicking on the next or previous page or by using the TOC. However I converted all of the pdf pages into html (one file for every page) and then using a TOC I created was able to process the book into epub. It's readable using the ebook reader in calibre, but when I go to edit it in Sigil all the text is on *one line* (on each page). I tried adding manual <br /> at the end of each line but even that didn't help. So somehow the carriage return isn't being paired with a line feed. It's odd because if I click on the html links that I created they display fine in a web browser. So it looks to be valid html. |
![]() |
![]() |
![]() |
#8 |
Media Bloke
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,382
Karma: 113956855
Join Date: Sep 2010
Location: NSW - Australia
Device: iOS
|
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2011
Device: Kindle 2
|
I meant to reply. I'm not sure what the problem was, but gave up on the html conversion process. I have an older version of Adobe Acrobat that only runs in the XP environment, so I fired up my virtual system and converted the PDF to rich text. It was relatively painless, and I just needed a little editing in Sigil.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Order of Chapters in HTML->ePub | alias_neo | Calibre | 9 | 05-16-2011 11:55 AM |
Convert HTML to MOBI (HTML recognized as ZIP file) | pdubois | Conversion | 1 | 01-25-2011 12:55 PM |
PRS-950 Order a 950 delivered now (not pre-order) for $239.99 | sun surfer | Sony Reader | 2 | 12-16-2010 11:06 AM |
Calibre Recipe HTML content differs from raw html of index.html. | krunk | Calibre | 4 | 09-20-2010 09:48 PM |
Access to local HTML files and content, HTML ebooks, annotation on HTML ebooks | leo315 | enTourage Archive | 2 | 05-10-2010 02:40 PM |