Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-19-2008, 11:35 AM   #16
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Hadrien View Post
That's the first step but it's not enough.
calibre will split on page breaks first and then on <div> and <p> tags if that is not enough. That should take care of most cases.

@JeffElkins: I just tested metadata on the reader. Works for me. What does epub-meta on the epub file give you?
kovidgoyal is offline   Reply With Quote
Old 09-19-2008, 12:11 PM   #17
Hadrien
Feedbooks.com Co-Founder
Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.
 
Hadrien's Avatar
 
Posts: 2,263
Karma: 145123
Join Date: Nov 2006
Location: Paris, France
Device: Sony PRS-t-1/350/300/500/505/600/700, Nexus S, iPad
I honestly can't think of a good way to split automatically > 300k flows though. Sure, using those <div> and <p> tags is necessary, but you might still break the flow in the middle of a dialog.
Hadrien is offline   Reply With Quote
Advert
Old 09-19-2008, 01:04 PM   #18
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah but having a couple of misplaced page breaks is much preferable to having a file that doesn't work at all. Oh and I should correct myself. The split order is actually going to be:

page-break
h1-h6
div
p
kovidgoyal is offline   Reply With Quote
Old 09-19-2008, 01:12 PM   #19
Hadrien
Feedbooks.com Co-Founder
Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.
 
Hadrien's Avatar
 
Posts: 2,263
Karma: 145123
Join Date: Nov 2006
Location: Paris, France
Device: Sony PRS-t-1/350/300/500/505/600/700, Nexus S, iPad
Quote:
Originally Posted by kovidgoyal View Post
Yeah but having a couple of misplaced page breaks is much preferable to having a file that doesn't work at all. Oh and I should correct myself. The split order is actually going to be:

page-break
h1-h6
div
p
On the Sony Reader. It'll work on DE desktop, FBReader and Stanza. I hate the fact that we have to potentially add page breaks that have nothing to do in the text for a single device...
Hadrien is offline   Reply With Quote
Old 09-19-2008, 01:19 PM   #20
JeffElkins
Guru
JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.
 
JeffElkins's Avatar
 
Posts: 780
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
Quote:
Originally Posted by kovidgoyal View Post
calibre will split on page breaks first and then on <div> and <p> tags if that is not enough. That should take care of most cases.

@JeffElkins: I just tested metadata on the reader. Works for me. What does epub-meta on the epub file give you?
Quote:
Title : Table of Contents
Author : Unknown
Language : Unknown
When viewed in calibre all metadata is correct.
JeffElkins is offline   Reply With Quote
Advert
Old 09-19-2008, 01:20 PM   #21
JeffElkins
Guru
JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.
 
JeffElkins's Avatar
 
Posts: 780
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
Quote:
Originally Posted by Hadrien View Post
On the Sony Reader. It'll work on DE desktop, FBReader and Stanza. I hate the fact that we have to potentially add page breaks that have nothing to do in the text for a single device...
Are you saying that epub on the Sony is broken?
JeffElkins is offline   Reply With Quote
Old 09-19-2008, 01:29 PM   #22
Hadrien
Feedbooks.com Co-Founder
Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.
 
Hadrien's Avatar
 
Posts: 2,263
Karma: 145123
Join Date: Nov 2006
Location: Paris, France
Device: Sony PRS-t-1/350/300/500/505/600/700, Nexus S, iPad
Quote:
Originally Posted by JeffElkins View Post
Are you saying that epub on the Sony is broken?
I wouldn't say broken. I'd rather say that ePub on the Sony Reader has a different set of rules than ePub based on the official specs, that makes things much more complicated and require to arbitrarily add page breaks where there should be none.
Hadrien is offline   Reply With Quote
Old 09-19-2008, 01:32 PM   #23
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Hadrien View Post
On the Sony Reader. It'll work on DE desktop, FBReader and Stanza. I hate the fact that we have to potentially add page breaks that have nothing to do in the text for a single device...
FBReader and stanza dont have support for CSS. The situation is that if you want to view epub files on current generation devices with full support for XHTML1.1+CSS2 your only hope is adobe DE. And since all devices are memory limited, there is going to be some form of constraint on all of them. Which means that you can only view unsplit EPUB files on a desktop. To me that's completely irrelevant, since I have no desire to read ebooks on a desktop.
kovidgoyal is offline   Reply With Quote
Old 09-19-2008, 02:51 PM   #24
Hadrien
Feedbooks.com Co-Founder
Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.
 
Hadrien's Avatar
 
Posts: 2,263
Karma: 145123
Join Date: Nov 2006
Location: Paris, France
Device: Sony PRS-t-1/350/300/500/505/600/700, Nexus S, iPad
Quote:
Originally Posted by kovidgoyal View Post
FBReader and stanza dont have support for CSS. The situation is that if you want to view epub files on current generation devices with full support for XHTML1.1+CSS2 your only hope is adobe DE. And since all devices are memory limited, there is going to be some form of constraint on all of them. Which means that you can only view unsplit EPUB files on a desktop. To me that's completely irrelevant, since I have no desire to read ebooks on a desktop.
But as you've stated yourself, DE mobile could at least provide a fallback with no or minimal CSS support in this case, rather than a cryptic "Paging Error" message.

There's also a whole difference between unsplit ePub and an ePub file where one flow is 310k.
Hadrien is offline   Reply With Quote
Old 09-19-2008, 02:59 PM   #25
JeffElkins
Guru
JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.
 
JeffElkins's Avatar
 
Posts: 780
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
My desire was to maintain one library, usable in both my Nokia tablets and Sony Readers (Two 505s, an N800 and 770). Looks like that's a non-starter for a while
JeffElkins is offline   Reply With Quote
Old 09-19-2008, 04:47 PM   #26
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
True, I agree the Adobe DE could have been designed a lot better, but the fact remains that the only way users are going to be able to use epub in all its glory on their devices is by some sort of splitting.

@JeffElkins: Once I implement splitting support you will be able to move wholly to using epub on all your devices.

EDIT: And I should add that I doubt splitting is going to change the meaning of the content in EPUB files significantly, in a vast majority of cases.
kovidgoyal is offline   Reply With Quote
Old 09-19-2008, 04:52 PM   #27
JeffElkins
Guru
JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.JeffElkins is no ebook tyro.
 
JeffElkins's Avatar
 
Posts: 780
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
Quote:
Originally Posted by kovidgoyal View Post
True, I agree the Adobe DE could have been designed a lot better, but the fact remains that the only way users are going to be able to use epub in all its glory on their devices is by some sort of splitting.

@JeffElkins: Once I implement splitting support you will be able to move wholly to using epub on all your devices.

EDIT: And I should add that I doubt splitting is going to change the meaning of the content in EPUB files significantly, in a vast majority of cases.
Good to know, thank you.
JeffElkins is offline   Reply With Quote
Old 09-19-2008, 05:01 PM   #28
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
Quote:
Originally Posted by kovidgoyal View Post
And I should add that I doubt splitting is going to change the meaning of the content in EPUB files significantly, in a vast majority of cases.
I agree, but in any case once Calibre has epub2epub with splitting it will be ok for DRM-free ePubs to be "unsplit" because Calibre can split them for devices that need it.

Also, if anyone does not like where Calibre splits an ePub they can always add their own page-break to the original and have Calibre re-split it.
wallcraft is offline   Reply With Quote
Old 09-20-2008, 03:16 PM   #29
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,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
version 0.4.85 is now available with comic2epub
kovidgoyal is offline   Reply With Quote
Old 09-21-2008, 02:01 PM   #30
fireproof
Enthusiast
fireproof began at the beginning.
 
Posts: 45
Karma: 16
Join Date: Mar 2004
Device: Palm Tungsten|TX, Sony Reader^H^H^H^H, iLiad, iPhone
html2epub looking for the wrong source file?

I'm using the command-line tools that are installed with the MacOS X version of Calibre (v 0.4.85), and html2epub seems to be using a cached html document (codyw1003010030-8.html) instead of the XML file specified at runtime (collinsw155155.xml):

Code:
dsl81:/tmp matthew$ /usr/bin/html2epub -o /tmp/collinsw155155.epub --chapter-mark=both --cover=/tmp/collinsw155155.jpg -t "The Moonstone" -a "Wilkie Collins" /tmp/collinsw155155.xml
Building file list...
	Parsing /tmp/codyw1003010030-8.html
	Parsing /tmp/codyw1003010030-8_toc.html
Output written to /tmp/collinsw155155.epub


dsl81:/tmp matthew$ /usr/bin/html2epub -o /tmp/collinsw155155.epub --chapter-mark=both --cover=/tmp/collinsw155155.jpg -t "The Moonstone" -a "Wilkie Collins" -vvv /tmp/collinsw155155.xml
Building file list...
	Found files...
		HTMLFile:0:a:/tmp/codyw1003010030-8.html
		HTMLFile:0:a:/tmp/codyw1003010030-8_toc.html
[INFO] __init__.pyo:297: 	Parsing /tmp/codyw1003010030-8.html
[DEBUG] __init__.pyo:297: Written processed HTML to /tmp/codyw1003010030-8.html-parsed.html
[DEBUG] __init__.pyo:297: Written processed HTML to /tmp/codyw1003010030-8.html-nocss.html
[INFO] __init__.pyo:297: 	Parsing /tmp/codyw1003010030-8_toc.html
[DEBUG] __init__.pyo:297: Written processed HTML to /tmp/codyw1003010030-8_toc.html-parsed.html
[DEBUG] __init__.pyo:297: Written processed HTML to /tmp/codyw1003010030-8_toc.html-nocss.html
Output written to /tmp/collinsw155155.epub

dsl81:/tmp matthew$ rm -f codyw1003010030-8.html

dsl81:/tmp matthew$ /usr/bin/html2epub -o /tmp/collinsw155155.epub --chapter-mark=both --cover=/tmp/collinsw155155.jpg -t "The Moonstone" -a "Wilkie Collins" -vvv /tmp/collinsw155155.xml
Building file list...
Traceback (most recent call last):
  File "/Applications/calibre.app/Contents/Resources/loaders/html2epub.py", line 9, in <module>
    main()
  File "/Applications/calibre.app/Contents/Resources/lib/python2.5/site-packages.zip/calibre/ebooks/epub/from_html.py", line 165, in main
  File "/Applications/calibre.app/Contents/Resources/lib/python2.5/site-packages.zip/calibre/ebooks/epub/from_html.py", line 91, in convert
  File "/Applications/calibre.app/Contents/Resources/lib/python2.5/site-packages.zip/calibre/ebooks/html.py", line 616, in get_filelist
  File "/Applications/calibre.app/Contents/Resources/lib/python2.5/site-packages.zip/calibre/ebooks/html.py", line 227, in opf_traverse
  File "/Applications/calibre.app/Contents/Resources/lib/python2.5/site-packages.zip/calibre/ebooks/html.py", line 112, in __init__
IOError: Could not read from file: /tmp/codyw1003010030-8.html with error: [Errno 2] No such file or directory: u'/tmp/codyw1003010030-8.html'
Is there something I need to clear out of the filesystem? This command worked for several hundred files before something somewhere gave out...

Lest it sound like I'm ungrateful, I'd like to say that this looks like just the epub creation tool I've been waiting for!
fireproof is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Epub Output: Line Height greenapple Conversion 20 01-27-2013 09:27 AM
EPUB output justification toki08 Calibre 10 01-08-2011 04:14 PM
Calibre epub output details and Nook squidward Calibre 6 11-24-2010 03:21 PM
epub output metadata troymc Calibre 5 05-22-2010 12:23 AM
Problem with epub output in Cybook Gen3 fjf Calibre 3 02-03-2010 02:23 AM


All times are GMT -4. The time now is 01:56 PM.


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