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 01-26-2019, 12:11 AM   #1
iddetik
Junior Member
iddetik began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2019
Device: none
Recipe to output ToC as flattened ?

I'm not sure how to say it properly, I have a recipe with hundreds of feeds. However these feeds only contains 2-8 articles and all these feeds are connected to each other.

The default way Calibre fetching these feeds will result in messy ToC in epub to be like this :

Title
|
|- Feeds1
| |
| |-Article 1
| |-Article 2
|
|-Feeds2
| |
| |-Article 3
| |-Article 4
...
|
|-Feeds487
| |
| |-Article 874
| |-Article 875
| |-Article 876

Is there any way for me to simplify the output so i don't have html named Feeds and just make a bulk of articles merged as one.

Like this i think :

Title
|-Article 1
|-Article 2
|-Article 3
...
|-Article 876
iddetik is offline   Reply With Quote
Old 01-26-2019, 12:32 AM   #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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
override parse_feeds() in your recipe. Call the base clas simplementation which will build th enormal list of articles, then manipulate the result as you like.
kovidgoyal is offline   Reply With Quote
Advert
Old 01-26-2019, 03:18 AM   #3
iddetik
Junior Member
iddetik began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2019
Device: none
Quote:
Originally Posted by kovidgoyal View Post
override parse_feeds() in your recipe. Call the base clas simplementation which will build th enormal list of articles, then manipulate the result as you like.
Thank you for the guide, i'll see what i can do
iddetik is offline   Reply With Quote
Old 01-26-2019, 03:37 AM   #4
iddetik
Junior Member
iddetik began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2019
Device: none
Sorry to bother you again, may i know any tools that can debug ebook-converter when running so i can see how the populated feed object looks like?

Right now i'm looking at https://manual.calibre-ebook.com/de/...pe.parse_feeds but i still struggling with how the hierarcy implemented.
iddetik is offline   Reply With Quote
Old 01-26-2019, 04:25 AM   #5
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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can use simple print statements and their output will be visible when you run ebook-convert
kovidgoyal is offline   Reply With Quote
Advert
Old 01-26-2019, 05:27 AM   #6
iddetik
Junior Member
iddetik began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2019
Device: none
Quote:
Originally Posted by kovidgoyal View Post
You can use simple print statements and their output will be visible when you run ebook-convert
Simple print statements did the job! Albeit a little bit slow for me i finally could make it works as 1 big feed, then trim the feed page from ToC.

Thank you!
iddetik is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with printable TOC in PDF output dma_k Conversion 2 08-19-2016 05:36 PM
nested toc appears flattened on kindle MrNiceGaius Conversion 2 09-19-2013 08:51 AM
ePUBs multilevel TOC gets flattened in conversion to MOBI damnated Conversion 14 09-02-2011 02:25 PM
bookmarks in PDF input, and TOC in output pimpoum Calibre 3 12-14-2010 12:21 PM
TOC location of Calibre recipe ebook output tylau0 Calibre 8 11-06-2010 09:48 AM


All times are GMT -4. The time now is 05:13 PM.


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