Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-03-2009, 09:12 PM   #1
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
EPUB autogenerated TOC

The latest version of calibre is grabbing all links in a Mobi ebook and adding them to the external TOC. I'm pretty sure it wasn't doing this before. This includes the external links to webpages.

How do I get it to stop doing this? Clicking "Do not add detected chapters to the TOC" doesn't work, nor does setting "Number of links to add to TOC" to zero.
Nate the great is offline   Reply With Quote
Old 03-03-2009, 09:14 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
--max-toc-links=0
kovidgoyal is offline   Reply With Quote
Advert
Old 03-03-2009, 09:24 PM   #3
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by kovidgoyal View Post
--max-toc-links=0
And I put this where, exactly? If I put it in the XPath window, the conversion crashes. Here:

Quote:
Job: **Convert book: Diamonds in the Sky**
**tuple**: ('TypeError', u"'bool' object is not iterable")
**Traceback**:
Traceback (most recent call last):
File "parallel.py", line 957, in worker
File "parallel.py", line 915, in work
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _any.py", line 177, in any2epub
File "contextlib.pyo", line 34, in __exit__
File "contextlib.pyo", line 113, in nested
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _any.py", line 177, in any2epub
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _html.py", line 409, in convert
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _html.py", line 243, in parse_content
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _html.py", line 122, in __init__
File "C:\Program Files\calibre\library.zip\calibre\ebooks\html.py", line 592, in detect_chapters
TypeError: 'bool' object is not iterable

**Log**:
Exploding MOBI file: c:\docume~1\nathan~1\locals~1\temp\calibre_0.4.142 _feuqw9.prc
Creating EPUB file...
[DEBUG] Processing HTMLFile:0:a:c:\docume~1\nathan~1\locals~1\temp\ca libre_0.4.142_j9x9bm_any2epub2\Diamonds_in_the_Sky .html...
[INFO] Parsing temp\calibre_0.4.142_j9x9bm_any2epub2\Diamonds_in_ the_Sky.html
('TypeError', u"'bool' object is not iterable")
Traceback (most recent call last):
File "parallel.py", line 957, in worker
File "parallel.py", line 915, in work
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _any.py", line 177, in any2epub
File "contextlib.pyo", line 34, in __exit__
File "contextlib.pyo", line 113, in nested
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _any.py", line 177, in any2epub
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _html.py", line 409, in convert
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _html.py", line 243, in parse_content
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _html.py", line 122, in __init__
File "C:\Program Files\calibre\library.zip\calibre\ebooks\html.py", line 592, in detect_chapters
TypeError: 'bool' object is not iterable

And I still have copies created with .4.141. They don't have exhibit this bug.
Nate the great is offline   Reply With Quote
Old 03-03-2009, 09:31 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
umm there's an option labeled number of links to add to table of contents
kovidgoyal is offline   Reply With Quote
Old 03-03-2009, 09:43 PM   #5
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by kovidgoyal View Post
umm there's an option labeled number of links to add to table of contents
That doesn't work, and I said so in my first post. I also just tried it again. It still doesn't work. Please see the attached Epub file.
Attached Files
File Type: epub Diamonds in the Sky - Mike, Brotherton,_24.epub (324.5 KB, 265 views)
Nate the great is offline   Reply With Quote
Advert
Old 03-03-2009, 09:51 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The EPUB file isn't any use, I need the source file you used for the conversion
kovidgoyal is offline   Reply With Quote
Old 03-03-2009, 09:53 PM   #7
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by kovidgoyal View Post
The EPUB file isn't any use, I need the source file you used for the conversion
You could use the Mobi file I uploaded for the other bug, but I attached the one I used for this.
Attached Files
File Type: prc Diamands in the Sky.prc (415.2 KB, 226 views)
Nate the great is offline   Reply With Quote
Old 03-03-2009, 10:18 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Will be fixed in next release
kovidgoyal is offline   Reply With Quote
Old 04-04-2009, 12:49 PM   #9
jswinden
Nameless Being
 
ePub TOCs still broken

When converting HTML to ePub, the TOC entries all point to page 1.
  Reply With Quote
Old 04-04-2009, 04:18 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
With what epub file?
kovidgoyal is offline   Reply With Quote
Old 04-10-2009, 12:02 PM   #11
jswinden
Nameless Being
 
Quote:
Originally Posted by kovidgoyal View Post
With what epub file?
??? I'm not sure I understand your question, but any html files that I convert to ePUB format using Calibre create a TOC with all the TOC links pointing to page 1. If I convert the same html files to Mobi using Calibre, the TOC is correct.
  Reply With Quote
Old 04-10-2009, 12:08 PM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Open a ticket and attach one of these html files alongwith whatever setting you used to create the TOC
kovidgoyal is offline   Reply With Quote
Old 04-10-2009, 03:25 PM   #13
WayneD
Enthusiast
WayneD began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Sep 2007
Device: Android phone + PRS-505
I have seen the issue with the TOC links all pointing to the first page as well. I've looked at the source file, and figured out that the issue is the Xpath chapter mark setting: when I set that option to "none", the issue is avoided.

When I looked at the source of my book, I see that there is a wrapping div that has the id that the link is expecting to use. (There is a page-break before this div in the css, btw.) However, when the chapter-mark setting is set to "page-break", it dumps the wrapping div that comes before the chapter header, but does not make a note that the lost ID is needed for a link.
WayneD is offline   Reply With Quote
Old 04-10-2009, 03:35 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by WayneD View Post
I have seen the issue with the TOC links all pointing to the first page as well. I've looked at the source file, and figured out that the issue is the Xpath chapter mark setting: when I set that option to "none", the issue is avoided.

When I looked at the source of my book, I see that there is a wrapping div that has the id that the link is expecting to use. (There is a page-break before this div in the css, btw.) However, when the chapter-mark setting is set to "page-break", it dumps the wrapping div that comes before the chapter header, but does not make a note that the lost ID is needed for a link.
Sounds like a bug, I'd appreciate a test case.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Epub to Epub loses TOC edbro Calibre 6 10-12-2010 04:24 PM
Calibre ePub TOC and Sigil salasnet Calibre 3 09-26-2010 05:34 PM
Epub style question - TOC luthar28 ePub 4 08-04-2010 07:19 PM
epub TOC crutledge ePub 2 02-14-2010 04:57 PM
Epub to Mobi & TOC Nate the great Calibre 12 10-01-2009 03:33 PM


All times are GMT -4. The time now is 10:01 AM.


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