View Single Post
Old 07-12-2009, 11:37 PM   #481
chorpler
Zealot
chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.
 
Posts: 128
Karma: 278
Join Date: Jun 2008
Device: Kindle; PRS-500; MobiPocket on Windows Mobile
Hey, when you use ebook-convert's --chapter= option, how are you supposed to delineate the XPath expression if the expression contains quotation marks (or just in general, really)? Do you do:

ebook-convert file1.html file2.lrf --chapter=//h2[@class="Chapter"]

or

ebook-convert file1.html file2.lrf --chapter="//h2[@class="Chapter"]"

or

ebook-convert file1.html file2.lrf --chapter='//h2[@class="Chapter"]'

or what? I've tried it all three ways, and the first two don't work at all while the third way gives me the following error:

Code:
Merging user specified metadata...
Detecting structure...
Traceback (most recent call last):
  File "cli.py", line 234, in <module>
  File "cli.py", line 226, in main
  File "calibre\ebooks\conversion\plumber.pyo", line 664, in run
  File "calibre\ebooks\oeb\transforms\structure.pyo", line 32, in __call__
  File "calibre\ebooks\oeb\transforms\structure.pyo", line 80, in detect_chapters
AttributeError: 'str' object has no attribute 'xpath'
chorpler is offline