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
Addict
sherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animals
 
Posts: 265
Karma: 6566
Join Date: Aug 2008
Location: New Plymouth - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo
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: 780
Karma: 194642
Join Date: Dec 2007
Location: Argentina
Device: Kindle PaperWhite, Motorola Xoom
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
Old 11-19-2008, 09:55 PM   #3
sherman
Addict
sherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animals
 
Posts: 265
Karma: 6566
Join Date: Aug 2008
Location: New Plymouth - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo
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,827
Karma: 11253505
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: 25,820
Karma: 5006091
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
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 05:39 PM.


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