11-19-2008, 04:28 AM | #1 |
Guru
Posts: 869
Karma: 2676800
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! |
11-19-2008, 07:44 PM | #2 | |
Guru
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
Quote:
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/') |
|
Advert | |
|
11-19-2008, 09:55 PM | #3 |
Guru
Posts: 869
Karma: 2676800
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. |
11-21-2008, 04:19 AM | #4 |
Wizard
Posts: 2,981
Karma: 11862367
Join Date: Apr 2008
Device: Sony Reader PRS-T2
|
I wasn't aware of a difference for ePub and LRF output for feeds... more features for LRF please Kovid!
|
11-21-2008, 04:42 AM | #5 |
creator of calibre
Posts: 44,340
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
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.
|
Advert | |
|
|
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 |