06-10-2013, 11:04 AM | #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? |
06-11-2013, 08:39 AM | #2 |
Groupie
Posts: 154
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
|
Of course, but you need to post your recipe here.
|
06-11-2013, 09:17 AM | #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)] |
06-12-2013, 10:04 PM | #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)] |
06-12-2013, 10:46 PM | #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?
|
12-04-2013, 06:22 PM | #6 | |
Connoisseur
Posts: 95
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 10:11 PM |
How to set "View Sections & Articles" | kindleren | Calibre | 6 | 03-06-2013 06:53 AM |
How to convert an EPUB to MOBI with "Sections & Articles" feature? | donnie888 | Conversion | 0 | 10-20-2012 10:29 PM |
Kindle Touch: "Sections & Articles" index page missing on newspapers/magazines | theseamonkey | Devices | 62 | 10-12-2012 02:49 PM |
Set the list of words considered to be "articles" for sort strings | lousignolo | Library Management | 8 | 05-13-2012 06:54 PM |