View Single Post
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,110
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