Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-18-2020, 03:10 PM   #1
ralfhein
Junior Member
ralfhein began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2020
Device: Onyx Boox Note
Remove Inline TOC from output of recipe

Hello,

I just came across this great functionality in Calibre recently and are trying to convert some of my own standalone "fetch website and convert to epub" scripts into Calibre recipes, so I can actually share them with others.

The most interesting of those is probably a working version for NZZ (Newspaper from Zürich, Switzerland, also popular in Germany) I am porting at the moment.

Anyway, I always find the inline TOC at the beginning of an ebook rather useless. Nobody will ever use those, since the reader software will most likely have its own TOC function that tends to be much nicer.

So here is my question: how do I get rid of the inline TOC in books built with a calibre recipe? There seems to be no option for this, so my last resort would be to run ebook-edit on the resulting book and try to regex the relevant pages out of it. Sounds rather ugly for me - is there any better way to do this?

There is also the postprocess_book() API hook, but I am unable to find any documentation for it.

Thank you for pointing me to any helpful resources or posts I might have overlooked!
ralfhein is offline   Reply With Quote
Old 04-18-2020, 10:20 PM   #2
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: 43,852
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Inline tocs are there specifically because many readers dont have nice functionality for this. In fact when converting if you set your output format to MOBI and output profile to a kindle profile it will be removed, since the Kindle does actually have nice functionality for this.
kovidgoyal is online now   Reply With Quote
Advert
Old 04-20-2020, 10:09 AM   #3
ralfhein
Junior Member
ralfhein began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2020
Device: Onyx Boox Note
Alright, understood, thanks! I will take a look at the output profiles, with your point in mind that would be the most sensible place to do this kind of adjustment (as it is rather reader related as opposed to book / content related).
ralfhein is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recipe to output ToC as flattened ? iddetik Recipes 5 01-26-2019 05:27 AM
Inline TOC from toc.ncx elmago79 Kindle Formats 38 03-25-2011 12:56 PM
Use Regex to Code an Inline TOC, from an External TOC's .ncx File mostlynovels ePub 2 03-16-2011 12:15 PM
TOC location of Calibre recipe ebook output tylau0 Calibre 8 11-06-2010 09:48 AM
Trying to make an Inline TOC crutledge Sigil 2 05-09-2010 05:46 AM


All times are GMT -4. The time now is 12:40 AM.


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