|
|
#1 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jun 2013
Device: Kindle Paperwhite
|
Create more sections other than "All articles"
Hi guys,
I'm working on an custom recipes. I simply defined "parse_index" method and returns the correct data, but I found all the articles now are under "All articles" section when it's open in my Kindle Paperwhite. Can I create more sections and assign articles to them? |
|
|
|
|
|
#2 |
|
Groupie
![]() Posts: 180
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
|
Of course, but you need to post your recipe here.
|
|
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jun 2013
Device: Kindle Paperwhite
|
Thanks, it's just very simple one. I've created a test recipe.
Code:
class TestRecipe(BasicNewsRecipe):
title = u'Test'
auto_cleanup = True
no_stylesheets = True
publication_type = 'magazine'
def parse_index(self):
article_list = []
article_list.append({ 'title' : 'Article 1', 'url' : 'http://lostechies.com/jimmybogard/2013/06/07/distributed-systems-reading-list/' });
article_list.append({ 'title' : 'Article 2', 'url' : 'http://lostechies.com/jimmybogard/2011/05/27/distributed-computing-fallacies-and-rest/' });
return [('Default', article_list)]
|
|
|
|
|
|
#4 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 41
Karma: 1005240
Join Date: Feb 2012
Device: Kindle Keyboard, iPhone
|
Yup. Here's what your sample's return statement might look like with two sections:
Code:
return [('Section One', article_list_one), ('Section Two', article_list_two)]
|
|
|
|
|
|
#5 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jun 2013
Device: Kindle Paperwhite
|
Thanks, that's just what I need. It looks like the section name is ignored when there's only one section, is it?
|
|
|
|
|
|
#6 | |
|
Zealot
![]() Posts: 106
Karma: 10
Join Date: Sep 2013
Device: Kindle Paperwhite (2012)
|
Quote:
I opened a bug about it: https://bugs.launchpad.net/calibre/+bug/1257959 |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert "The Economist" EPUB to MOBI = Lose Navigation to Articles and Sections | dukelov3 | Conversion | 3 | 03-08-2013 11:11 PM |
| How to set "View Sections & Articles" | kindleren | Calibre | 6 | 03-06-2013 07:53 AM |
| How to convert an EPUB to MOBI with "Sections & Articles" feature? | donnie888 | Conversion | 0 | 10-20-2012 11:29 PM |
| Kindle Touch: "Sections & Articles" index page missing on newspapers/magazines | theseamonkey | Devices | 62 | 10-12-2012 03:49 PM |
| Set the list of words considered to be "articles" for sort strings | lousignolo | Library Management | 8 | 05-13-2012 07:54 PM |