|
|
Thread Tools | Search this Thread |
Yesterday, 07:00 AM | #1 |
Junior Member
Posts: 5
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! |
Yesterday, 08:07 AM | #2 |
creator of calibre
Posts: 44,270
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
Advert | |
|
Yesterday, 08:50 AM | #3 |
Junior Member
Posts: 5
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? |
Yesterday, 09:00 AM | #4 |
Well trained by Cats
Posts: 30,285
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 |
Yesterday, 03:07 PM | #5 |
Junior Member
Posts: 5
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? |
Advert | |
|
Yesterday, 10:45 PM | #6 |
creator of calibre
Posts: 44,270
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.
|
Today, 07:56 AM | #7 |
Junior Member
Posts: 5
Karma: 10
Join Date: Sep 2024
Device: none
|
Alright, thank you for clarifying.
Also, thanks for making Calibre and releasing it for free. I am a big fan of the software. |
Today, 08:16 AM | #8 |
Junior Member
Posts: 5
Karma: 10
Join Date: Sep 2024
Device: none
|
I hate to keep asking for help but - can you tell me where the conversion logs are stored?
I tried running calibre-debug --gui and calibre-debug --edit-book and those logs didn't contain the ToC conversion commands. And I don't see a reference to conversion logs in the manual: https://manual.calibre-ebook.com/edit.html I tried running calibre in debug mode as suggested here (https://www.mobileread.com/forums/sh...d.php?t=344814) but those logs didn't contain the conversion details. How can I access the conversion logs? Thank you for your help! |
Today, 09:35 AM | #9 |
Guru
Posts: 990
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
Today, 11:45 AM | #10 |
Well trained by Cats
Posts: 30,285
Karma: 57979022
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
Tags |
toc, toc creation |
|
Similar Threads | ||||
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 |