Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 09-04-2024, 03:34 PM   #16
Whip
Member
Whip began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2024
Device: none
Thank you for the suggestion DNSB. However, I don't think that will work.

When I set --level1-toc to //*[(name()='h1' or name()='h3')] it gathers all <h1> tags and all <h3> tags and makes them ToC items at level1.

I'm worried at this point the command line ebook-convert tool just doesn't make ToCs at the full depth that I need. I don't see a way to make <h4> and <h5> tags turn into level4 and level5 ToC elements. It seems like the GUI is the only way to make ToCs up to 5 or 6 levels deep.

Am I missing anything? Or am I correct that ebook-convert can only make ToCs with three levels of ToC elements?
Whip is offline   Reply With Quote
Old 09-04-2024, 03:49 PM   #17
Whip
Member
Whip began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2024
Device: none
If ebook-convert doesn't make ToC with depth >3, is there any other automated way to do that? Like a script in Calibre's code base I could use?

It would be really helpful to automate this rather than use the UI. Thanks for any suggestions.
Whip is offline   Reply With Quote
Old 09-04-2024, 10:25 PM   #18
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,542
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah conversion, whether from the gui or the command line can generate at most depth 3 tocs You will find that some ebook readers have issues with even that depth. If you want deeper tocs you need to use the toc edit tool after conversion.
kovidgoyal is offline   Reply With Quote
Old 09-05-2024, 09:55 AM   #19
Whip
Member
Whip began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2024
Device: none
I didn't know some e-readers handle deeper ToCs poorly. Thanks. I wondered why the CLI would be limited to three ToC levels. I'll stick with that.

Thanks to everyone for your help.

Also, FYI, the reason I posted several times in a row yesterday was that some posts appeared instantly and some appeared only after a delay, so I wasn't sure they had actually submitted properly. Didn't mean to spam the thread.
Whip is offline   Reply With Quote
Old 09-05-2024, 10:05 AM   #20
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,752
Karma: 75000002
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by Whip View Post
Also, FYI, the reason I posted several times in a row yesterday was that some posts appeared instantly and some appeared only after a delay, so I wasn't sure they had actually submitted properly. Didn't mean to spam the thread.
An ongoing challenge at MR. Quite often posts from new members (and at times from those who are not that active) go into "Moderation". Until a moderator notices this your post will be hidden to non mods.


Sent from my Pixel 7a using Tapatalk
PeterT is offline   Reply With Quote
Old 09-05-2024, 10:23 AM   #21
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,415
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
I think the OP is doing everything from the command line.
Why would the OP want to make things more difficult?
JSWolf is online now   Reply With Quote
Old 09-05-2024, 11:24 AM   #22
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,444
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by JSWolf View Post
Why would the OP want to make things more difficult?
Book Production?
Arnold Bailey used a very early Calibre for Webscriptions (Baen's entry into e-books). There were Calibre footprints all over the EPUB.

Ask @Hitch (or other book wranglers that haunt MR) if they use the command line or GUI .

But, with the power of recent (I am calling a Decade ago recent?) Calibre and plugins. Why! is a good question.
Remoting in over a 300baud line, command line is really the way to go
For just TOC work, you can add a TOC icon onto the main GUI. (I only work on EPUB2 for personal use, so I dont know if this works for a NAV. But I suspect, neither does the CLI.
theducks is offline   Reply With Quote
Old 09-05-2024, 01:37 PM   #23
jmurphy
Zealot
jmurphy ought to be getting tired of karma fortunes by now.jmurphy ought to be getting tired of karma fortunes by now.jmurphy ought to be getting tired of karma fortunes by now.jmurphy ought to be getting tired of karma fortunes by now.jmurphy ought to be getting tired of karma fortunes by now.jmurphy ought to be getting tired of karma fortunes by now.jmurphy ought to be getting tired of karma fortunes by now.jmurphy ought to be getting tired of karma fortunes by now.jmurphy ought to be getting tired of karma fortunes by now.jmurphy ought to be getting tired of karma fortunes by now.jmurphy ought to be getting tired of karma fortunes by now.
 
Posts: 106
Karma: 1133068
Join Date: Sep 2007
Device: ipaq
Quote:
Originally Posted by JSWolf View Post
Why would the OP want to make things more difficult?
If you are going to reference the OP, try reading the title of the thread.
jmurphy is offline   Reply With Quote
Old 09-05-2024, 04:11 PM   #24
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,536
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
Why would the OP want to make things more difficult?
For me, one off tasks are done from the GUI. If there is a task that is going to be done multiple times and can be automated using the CLI, I see no reason for me to waste my time doing repetitive tasks when the computer can do them for me.
DNSB is offline   Reply With Quote
Reply

Tags
toc, toc creation


Forum Jump

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 04:12 PM
How to insert automatically valid id's in ToC headings? chaot Editor 18 02-01-2017 07:55 AM
Generated TOC at beginning of PDF via command line alexandreaquiles Conversion 1 10-12-2014 04:24 AM
HTML to Epub conversion isn't generating TOC through command line marcosalles Conversion 1 02-20-2014 11:09 PM
Calibre Command Line Interface TOC bcolflesh Calibre 3 02-04-2010 05:09 PM


All times are GMT -4. The time now is 07:38 PM.


MobileRead.com is a privately owned, operated and funded community.