|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Sep 2024
Device: none
|
how to use command line to automatically create ToC from all headings?
Hello,
I want to use the command line to convert an html book to epub and select the setting "Generate ToC from all headings." I don't see this option available in the command line interface in the documentation, but it is available in the calibre edit GUI. Currently, I have to drag the html into calibre, convert to epub, click edit on the converted file, open the ToC GUI, delete the auto-generated ToC, then click "Generate ToC from all headings". Can someone tell me how to automate this process from the command line with ebook-convert, ebook-edit, or some other tool? Thank you! |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,269
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Sep 2024
Device: none
|
I looked at that documentation and I don't see an option for exactly what I'm looking for.
Is there a flag for "Generate ToC from all headings"? When I click that button in the GUI, the ToC comes out perfectly. I just don't see a command-line flag for that setting. Can you please point me to it? |
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,281
Karma: 57979022
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
ebook-convert input_file output_file [options]
Did you scroll down in the Help file? There is a TOC section with options |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Sep 2024
Device: none
|
I do not see any setting described in the help documentation that does what I am asking for. I specifically want a command line option that matches the GUI button for "Generate ToC from all headings"
None of the flags in the documentation that I've found describe that option. Do you know how I could select that setting from the command line? |
![]() |
![]() |
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,269
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no such flag. You need to specify the level1 through level3 settings manually. The button in the GUI does just that under the hood. Read their docs to understand what you need to put there, or look at the conversion log of the GUI conversion to see what values those settings have.
|
![]() |
![]() |
![]() |
Tags |
toc, toc creation |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
create a useable TOC when book uses images for chapter headings | stumped | Sigil | 23 | 06-09-2019 03:12 PM |
How to insert automatically valid id's in ToC headings? | chaot | Editor | 18 | 02-01-2017 06:55 AM |
Generated TOC at beginning of PDF via command line | alexandreaquiles | Conversion | 1 | 10-12-2014 03:24 AM |
HTML to Epub conversion isn't generating TOC through command line | marcosalles | Conversion | 1 | 02-20-2014 10:09 PM |
Calibre Command Line Interface TOC | bcolflesh | Calibre | 3 | 02-04-2010 04:09 PM |