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-04-2017, 12:13 AM   #1
atsiong1
Junior Member
atsiong1 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Kindle
The Intercept Recipe - TOC subheadings

Hi!

I recently created a recipe for The Intercept using Calibre's "Add Custom News Source" function. To do so, I copied and pasted the following feed: https://theintercept.com/feed/?lang=en

It worked great. Sadly, on my Kindle I find that in the TOC all of my article titles are collapsed under "Sections" -> "All Articles" -> Article_1, Article_2. I wish I could remove the extraneous header called "All Articles."

Can I correct this by using remove_tags or remove_tags_before in "Add Custom News Source" -> "Edit this recipe"?

So far I have attempted the following, to no avail:

------

#!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1491254803(BasicNewsRecipe):
title = 'The Intercept'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
cover_url = 'https://prod01-cdn07.cdn.firstlook.org/assets/static/logo-rectangle.png'
remove_tags_before = dict(id='num_3')
feeds = [
('The Intercept', 'https://theintercept.com/feed/?lang=en'),
]

------

AND

-------

#!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1491254803(BasicNewsRecipe):
title = 'The Intercept'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
cover_url = 'https://prod01-cdn07.cdn.firstlook.org/assets/static/logo-rectangle.png'
remove_tags_before = dict(attrs={'id': 'num_3'})
feeds = [
('The Intercept', 'https://theintercept.com/feed/?lang=en'),
]


Any help is greatly appreciated!
atsiong1 is offline   Reply With Quote
Old 04-04-2017, 12:18 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,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The periodical format used by amazon requires sub-sections + articles. Send your MOBI file via a USB connection to get the periodical UI on the Kindle. If you send it be email amazon reformats it.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-04-2017, 09:40 AM   #3
atsiong1
Junior Member
atsiong1 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Kindle
Thank you very much for your quick reply and for making such a useful software available!

I didn't realize the issue was from Amazon. The convenience of sending the periodicals to the Kindle by email may outweigh the annoyance of the overly-nested TOC, for now.
atsiong1 is offline   Reply With Quote
Reply

Tags
kindle, table of contents


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pagebreaks and section toc in recipe sup Recipes 0 09-07-2016 09:30 AM
Recipe for The Intercept? drakaka Recipes 2 06-30-2016 04:31 PM
Calibre : Recipe Wissen.de : modify TOC ? xav Recipes 0 09-07-2014 08:00 AM
Intercept and stop keys Reventlov Kindle Developer's Corner 5 12-15-2012 09:16 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 09:33 PM.


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