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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-19-2008, 04:28 AM   #1
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Yet another Recipe request..

Hey folks, I was wondering if anyone with more expertise than me could create a recipe for http://www.stuff.co.nz/, with emphasis on the Top Stories, National and World news, Sport, tech, and the Manawatu Standard local news feeds?

I have tried creating a basic recipe (which works) but is badly formatted for the reader and I had trouble following the tutorial - mainly to get the print versions of the articles.

So if anyone can please help, it would be much appreciated!
sherman is offline   Reply With Quote
Old 11-19-2008, 07:44 PM   #2
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by sherman View Post
Hey folks, I was wondering if anyone with more expertise than me could create a recipe for http://www.stuff.co.nz/, with emphasis on the Top Stories, National and World news, Sport, tech, and the Manawatu Standard local news feeds?
Here is the recipe with just one feed, you can add the rest you prefer.

Code:
#!/usr/bin/env  python

__license__   = 'GPL v3'
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
'''
stuff.co.nz
'''

from calibre.web.feeds.news import BasicNewsRecipe

class Stuff(BasicNewsRecipe):
    title                 = u'Stuff NZ'
    __author__            = u'Darko Miletic'
    description           = u'news from New Zealand'    
    oldest_article        = 7
    max_articles_per_feed = 100
    delay                  = 1
    simultaneous_downloads = 1 
    no_stylesheets        = True
    use_embedded_content  = False

    feeds          = [  
                       (u'Top Stories', u'http://www.stuff.co.nz/feeds/topstories.xml')
                     ]

    def print_version(self, url):
        main, sep, rest = url.partition('?')
        return main.replace('http://www.stuff.co.nz/','http://www.stuff.co.nz/print/')
kiklop74 is offline   Reply With Quote
Advert
Old 11-19-2008, 09:55 PM   #3
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Thank you so much!

That worked a treat.

And outputting to ePub even gives me multi level TOC in the menu system

Thank you Kovid for such an awesome feature in such wonderful software.
sherman is offline   Reply With Quote
Old 11-21-2008, 04:19 AM   #4
AprilHare
Wizard
AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.AprilHare ought to be getting tired of karma fortunes by now.
 
AprilHare's Avatar
 
Posts: 2,981
Karma: 11862367
Join Date: Apr 2008
Device: Sony Reader PRS-T2
Quote:
Originally Posted by sherman View Post
Thank you so much!

That worked a treat.

And outputting to ePub even gives me multi level TOC in the menu system

Thank you Kovid for such an awesome feature in such wonderful software.
I wasn't aware of a difference for ePub and LRF output for feeds... more features for LRF please Kovid!
AprilHare is offline   Reply With Quote
Old 11-21-2008, 04:42 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: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by AprilHare View Post
I wasn't aware of a difference for ePub and LRF output for feeds... more features for LRF please Kovid!
the lack multi-level toc is one of the many restrictions the LRF format suffers from. Note that these are restrictions in the format itself. Nothing I can do about it.
kovidgoyal is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Request for recipe sumper Recipes 2 10-11-2010 02:25 AM
Recipe request please aessedai44 Recipes 2 10-06-2010 01:07 AM
Request for Recipe girlperson1 Calibre 2 11-14-2008 10:43 PM
Request for Recipe girlperson1 Calibre 2 11-14-2008 07:59 AM
Request for recipe girlperson1 Calibre 2 11-13-2008 10:03 PM


All times are GMT -4. The time now is 01:03 AM.


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