Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-10-2013, 11:04 AM   #1
JeffreyZhao
Junior Member
JeffreyZhao began at the beginning.
 
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?
JeffreyZhao is offline   Reply With Quote
Old 06-11-2013, 08:39 AM   #2
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Of course, but you need to post your recipe here.
Steven630 is offline   Reply With Quote
Old 06-11-2013, 09:17 AM   #3
JeffreyZhao
Junior Member
JeffreyZhao began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2013
Device: Kindle Paperwhite
Quote:
Originally Posted by Steven630 View Post
Of course, but you need to post your recipe here.
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)]
Can I put two articles into different sections?
JeffreyZhao is offline   Reply With Quote
Old 06-12-2013, 10:04 PM   #4
anoved
Enthusiast
anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.
 
anoved's Avatar
 
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)]
anoved is offline   Reply With Quote
Old 06-12-2013, 10:46 PM   #5
JeffreyZhao
Junior Member
JeffreyZhao began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2013
Device: Kindle Paperwhite
Quote:
Originally Posted by anoved View Post
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)]
Thanks, that's just what I need. It looks like the section name is ignored when there's only one section, is it?
JeffreyZhao is offline   Reply With Quote
Old 12-04-2013, 06:22 PM   #6
sup
Enthusiast
sup began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Sep 2013
Device: Kindle Paperwhite (2012)
Quote:
Originally Posted by JeffreyZhao View Post
Thanks, that's just what I need. It looks like the section name is ignored when there's only one section, is it?
Yes, seems so, I noticed it too: http://www.mobileread.com/forums/sho...d.php?t=228140

I opened a bug about it:
https://bugs.launchpad.net/calibre/+bug/1257959
sup is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 08:35 AM.


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