09-21-2010, 04:35 PM | #2791 |
Guru
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
New recipe for Slo-Tech:
|
09-21-2010, 05:11 PM | #2792 |
Member
Posts: 19
Karma: 10
Join Date: Feb 2010
Location: Los Angeles, CA
Device: Kindle 3
|
Ok, now I'm attempting to remove duplicate urls that might appear in multiple feeds that I'm aggregating.
I created a list called 'added_links' then overloaded the is_link_wanted method like so: Code:
def is_link_wanted(self, url, tag): wanted = False if url not in self.added_links: self.added_links.append(url) wanted = True return wanted |
Advert | |
|
09-21-2010, 05:37 PM | #2793 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Code:
def get_browser(self): br = BasicNewsRecipe.get_browser(self) br.addheaders = [('Accept', 'text/html')] return br |
|
09-21-2010, 07:12 PM | #2794 |
Evangelist
Posts: 404
Karma: 664
Join Date: Dec 2009
Device: Kindle Paperwhite, Kindle DX, Kobo Aura HD
|
For teleread blog (one of the built-in recipes), is it possible to incorporate 'comments' made by visitors as part of the download? They are often sharp, witty and fun to read.
|
09-21-2010, 08:12 PM | #2795 | |
Enthusiast
Posts: 49
Karma: 10
Join Date: Aug 2009
Device: none
|
Quote:
ERROR: Invalid input: <p>Could not create recipe. Error:<br>unindent does not match any outer indentation level (recipe46.py, line 51) Code:
#!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>' ''' www.business-standard.com ''' from calibre.web.feeds.recipes import BasicNewsRecipe class BusinessStandard(BasicNewsRecipe): title = 'Business Standard' __author__ = 'Darko Miletic' description = "India's most respected business daily" oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False encoding = 'cp1252' publisher = 'Business Standard Limited' category = 'news, business, money, india, world' language = 'en_IN' conversion_options = { 'comments' : description ,'tags' : category ,'language' : language ,'publisher' : publisher ,'linearize_tables': True } remove_attributes=['style'] remove_tags = [dict(name=['object','link','script','iframe'])] feeds = [ (u'Todays Newspaper' , u'http://feeds.business-standard.com/rss/paper.xml' ) ,(u'Banking & finance' , u'http://feeds.business-standard.com/rss/1.xml' ) ,(u'Companies & Industry', u'http://feeds.business-standard.com/rss/2.xml') ,(u'Economy & Policy' , u'http://feeds.business-standard.com/rss/3.xml' ) ,(u'Opinion and analysis', u'http://feeds.business-standard.com/rss/5_0.xml') ,(u'Life & Leisure' , u'http://feeds.business-standard.com/rss/6_0.xml' ) ,(u'Markets & Investing' , u'http://feeds.business-standard.com/rss/12.xml' ) ,(u'Management & Mktg' , u'http://feeds.business-standard.com/rss/7_0.xml' ) ,(u'Tech World',u'http://feeds.business-standard.com/rss/8_0.xml') ] def print_version(self, url): print 'ORG URL IS: ', url split1 = url.split("/") print 'THE SPLIT IS: ', split1 id = len(split1) # we want to find the size of the array split # because we know the id will always be in the last index print_url = ‘http://www.business-standard.com/india/printpage.php?autono=’ + split1[id]+ ‘&tp=’ return print_url def get_article_url(self, article): return article.get('guid', None) the rss feeds page is http://feeds.business-standard.com/ Last edited by bhandarisaurabh; 09-21-2010 at 08:40 PM. |
|
Advert | |
|
09-21-2010, 09:37 PM | #2796 | |
Addict
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Quote:
anyway this code works. Spoiler:
|
|
09-22-2010, 03:00 AM | #2797 |
tenjooberrymuds
Posts: 58
Karma: 12
Join Date: Sep 2010
Device: Android
|
would love the RSS feed from
http://www.globalpropertyguide.com http://www.Wired.com holy cow! 187 pages to this thread, did not see that!! god knows the wired recipe is probably somewhere in there already Last edited by N13L5; 09-22-2010 at 03:07 AM. Reason: 187! |
09-22-2010, 06:20 AM | #2798 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Nov 2009
Location: Poland
Device: kindle 1st gen, kindle dxg, kindle paperwhite2
|
Here are 3 new recipes for polish feeds:
http://github.com/t3d/kalibrator/raw...24_ESKN.recipe http://github.com/t3d/kalibrator/raw...4_fakty.recipe http://github.com/t3d/kalibrator/raw...omorska.recipe The favicon for the first two is here: http://www.rmf24.pl/favicon.ico And for the last one: http://www.pomorska.pl/favicon.ico I'd also like to see my recipe nczas.recipe removed from calibre, since its feed is broken for monhts. Moreover here are some favicon that weren't added to calibre yet: fronda.recipe: http://fronda.pl/favicon.ico legeartis.recipe: http://olgierd.bblog.pl/s/favicon.ico michalkiewicz.recipe: http://michalkiewicz.pl/favicon.ico |
09-22-2010, 06:22 AM | #2799 | |
Addict
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Quote:
and here is globalproperty Spoiler:
Last edited by TonytheBookworm; 09-22-2010 at 07:24 AM. Reason: added globalpropertycode |
|
09-22-2010, 08:15 AM | #2800 |
Junior Member
Posts: 2
Karma: 10
Join Date: Sep 2010
Device: Kindle 3G
|
Hi,
first of all I have to thank you guys for your awesome work. Calibre, a Kindle and your recipes are giving me a real living the future feeling. There is one thing I would like to have that is not working for me: It's the Google Reader recipe. As soon as I start to fetch the news from this recipe I'll get this error: Spoiler:
I'm using my personal domain to login to google reader. e.g. myname@mydomain.com. Could that be the problem for the 403 error? I would like to debug the recipe but I could not find it. Maybe someone could tell me the name of the recipe or give me some hints how to solve the problem. Is there any public repository and/or bug tracking system for all the recipe? Thanks a lot. Last edited by eldan; 09-22-2010 at 08:18 AM. |
09-22-2010, 08:54 AM | #2801 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Go here and put in your email and password to test: https://www.google.com/accounts/ServiceLogin 2) The name of the recipe is the same as the name you used to select it for normal use/download. Choose the pull down arrow next to News and select "Add a custom news source" then "Customize builtin recipe" then choose the name to add it to the custom list, then select it in the list to see the code. 3) Yes, you can report bugs, (http://bugs.calibre-ebook.com) but don't do it until you're sure you have the right login credentials (I wrote the current login/authentication for the Google Reader recipe, but no other parts) If it's broken, I'll fix it. I don't use that recipe normally. |
|
09-22-2010, 09:17 AM | #2802 |
tenjooberrymuds
Posts: 58
Karma: 12
Join Date: Sep 2010
Device: Android
|
|
09-22-2010, 11:02 AM | #2803 |
Addict
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Could someone do me a favor and shed some light my way in regard to the extra_css ? Basically what is the difference between #bd and .bd and so forth?
I took and looked at some of the recipes and used firebug to try and find in the html where #bd is or whatever and i can't seem to find it. Let say for instance i had <div class='helloworld'>What a beautiful day it is. </div> and i wanted it to be bold or what have you. why doesn't this work ? Spoiler:
thanks in advance |
09-22-2010, 11:42 AM | #2804 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
<div class='helloworld'> vs spelling of: extra_css = ''' .helloword ?????? You probably know this, but just in case, the "difference between #bd and .bd" is that the first is for id="bd" and the second for class="bd". Usually, a class is for multiple elements on a page, while id is for individual elements, although that general rule is observed mostly in the breach. Last edited by Starson17; 09-22-2010 at 11:52 AM. |
|
09-22-2010, 11:51 AM | #2805 | |
Addict
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Quote:
I have noticed that in some cases the author will use a .headline or simply type h1 or even #div I was just hoping there was some documentation on it somewhere other than the general overview in the calibre docs. I flat out stink with css but I feel if i could get the syntax of the extra_css then I should be able to format some of the things more to my liking. And a side note. Man I have noticed after learning from you. I have been making recipes left and right and all for myself and for others. Never thought I would be doing that but none the less thanks for teaching me. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom column read ? | pchrist7 | Calibre | 2 | 10-04-2010 02:52 AM |
Archive for custom screensavers | sleeplessdave | Amazon Kindle | 1 | 07-07-2010 12:33 PM |
How to back up preferences and custom recipes? | greenapple | Calibre | 3 | 03-29-2010 05:08 AM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |