View Single Post
Old 02-04-2010, 03:41 PM   #3
bcolflesh
Junior Member
bcolflesh began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by GRiker View Post
to see the options for ebook-convert, from a command line type:
Code:
ebook-convert foo.mobi bar.mobi --help
Because of the '--help' at the end of the line, nothing will happen, it will just show you the available switches.
Replace foo.epub and bar.mobi with extensions more appropriate to your task, perhaps foo.html and bar.epub.

G
Ok, this shows the contents of the help - which I read online - from the TOC section:

"By default, if the source file has a Table of Contents, it will be used in preference to the automatically generated one."

So, at the beginning of my HTML file, I can make:

<div id="tocdiv">
<a class="toc" href="#chapter1">Chapter 1 link</a>
etc...

Then add the switch:

--level1-toc="//h:a[re:test(@class, 'toc', 'i')]"

to use the links in that div as the TOC?

I'm basing the parameter info on this post:

https://www.mobileread.com/forums/showthread.php?t=63898
bcolflesh is offline   Reply With Quote