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 05-19-2009, 02:07 PM   #1
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
html2epub and OPF files

Ok, so Windows XP sucks at the whole unicode via command-line thing, but I've noticed that all the command-line conversion utilities support OPF input. My question is, how strict are the command-line utilities with OPF files (particularly html2epub)?

Say, I have:
Code:
<?xml version="1.0"?>
<package version="2.0" xmlns="http://www.idpf.org/2007/opf">
 <metadata xmlns:opf="http://www.idpf.org/2007/opf">
   <title>Title Goes Here</title> 
   <creator>I.M. D’Author</creator>
 </metadata>
 <manifest>
  <item id="story" href="story.xhtml" media-type="application/xhtml+xml" />
 </manifest>
</package>
Will html2epub fix it, divide story.xhtml into chapter/300KB chunks, create the spine/table of contents, etc?

Last edited by ilovejedd; 05-19-2009 at 02:10 PM.
ilovejedd is offline   Reply With Quote
Old 05-19-2009, 02:21 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,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, it will, though you should use any2epub and you may have to specify the spine in addition
kovidgoyal is offline   Reply With Quote
Advert
Old 05-19-2009, 02:37 PM   #3
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by kovidgoyal View Post
Yes, it will, though you should use any2epub and you may have to specify the spine in addition
Ok, so if I have:
Code:
<?xml version="1.0"?>
<package version="2.0" xmlns="http://www.idpf.org/2007/opf">
 <metadata xmlns:opf="http://www.idpf.org/2007/opf">
   <title>Title Goes Here</title> 
   <creator>I.M. D’Author</creator>
 </metadata>
 <manifest>
  <item id="story" href="story.xhtml" media-type="application/xhtml+xml" />
 </manifest>
 <spine toc="ncx">
  <itemref idref="story" />
 </spine>
</package>
And I use the following command-line:
Code:
any2epub --level1-toc "//*[@class='chaptertitle']|//*[@class='toctitle']" --chapter "//*[@class='chapter']" --chapter-mark "pagebreak" --use-auto-toc "Title Goes Here.opf"
any2epub will copy the metadata (in this case title and author) from the OPF file, divide story.xhtml into chunks and create its own OPF file containing the new table of contents for the epub file?
ilovejedd is offline   Reply With Quote
Old 05-19-2009, 03:17 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,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yes .
kovidgoyal is offline   Reply With Quote
Old 05-19-2009, 03:52 PM   #5
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Ok. Thanks a bunch! Don't have my laptop with me, otherwise I'd just test.
ilovejedd is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What are opf and mimetype files? BookCat Other formats 6 12-15-2009 08:44 PM
OPF files to EPUB? debbielovesbooks Calibre 2 11-14-2009 09:44 PM
convertlit opf files to epub sassanik Calibre 4 07-17-2009 05:52 PM
Can html2epub create the OPF & NCX files? Acey Calibre 4 11-17-2008 12:33 AM
Question about html to lrf with opf files Blackguard Sony Reader 3 06-16-2008 03:53 PM


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


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