Register Guidelines E-Books Today's Posts Search

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

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 02-15-2010, 11:24 PM   #1441
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by Dereks View Post
Hi guys,
I was searching quite a lot through the topic, but didn't manage to find the exact solution.
I need to have a google reader recipe, which will pick up only starred items from the feed (no need for tagging and or storing it all in sub folders, just plain simple starred items). If I understand correctly that's how default google recipe used to work.
Have you tried the Google Reader Recipe that comes with Calibre? It is under Unknown not a country. Let us know if it works.
DoctorOhh is offline  
Old 02-16-2010, 01:44 AM   #1442
Dereks
Connoisseur
Dereks began at the beginning.
 
Posts: 57
Karma: 10
Join Date: Feb 2010
Device: Kindle Paperwhite 1
yes, I did.
It creates an empty page under "starred" and "broadcast" titles and then pick up all my tags and folders from the google reader.
Dereks is offline  
Advert
Old 02-16-2010, 03:38 AM   #1443
Daephex
Licensed Raconteur
Daephex will become famous soon enoughDaephex will become famous soon enoughDaephex will become famous soon enoughDaephex will become famous soon enoughDaephex will become famous soon enoughDaephex will become famous soon enough
 
Daephex's Avatar
 
Posts: 53
Karma: 514
Join Date: Nov 2009
Location: "Travelling"
Device: Kindle 3, Sony PRS-600, iPod Touch
Would it be possible to build a sort of "dragnet" recipe that would consistently search blogs for a certain phrase, and return me the results once a day? I have no programming skills whatsoever, but I wonder if this couldn't be done through Technorati or even Google's blog search somehow.
Daephex is offline  
Old 02-16-2010, 07:31 AM   #1444
p4np5n
Junior Member
p4np5n began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2010
Device: HTC HD2
Hi,

I am trying to create a recipe for a greek news website. The recipe so far looks like that:

Code:
from calibre.web.feeds.recipes import BasicNewsRecipe

class Kathimerini(BasicNewsRecipe):
    title                  = 'Kathimerini'
    __author__             = 'Pan'
    description            = 'News from Greece'
    oldest_article         = 2
    max_articles_per_feed  = 100
    encoding               = 'windows-1253'
    publisher              = 'Kathimerini'
    category               = 'news, GR'
    language               = 'el'

    feeds          = [
                      ('Πολιτική', 'http://wk.kathimerini.gr/xml_files/politics.xml'),
                    ]

    def print_version(self, url):
        return url.replace('http://news.kathimerini.gr/4dcgi/', 'http://news.kathimerini.gr/4dcgi/4dcgi/')
The feed I am trying it on is this:
http://wk.kathimerini.gr/xml_files/politics.xml

To get a printable view from a news item, say:
http://news.kathimerini.gr/4Dcgi/_w_...02/2010_390924

one has to add another "4Dcgi" string in the url:
http://news.kathimerini.gr/4Dcgi/4Dc...02/2010_390924
(I believe I've done it correctly. )

However, when executing the recipe, it seems to be unable to get any articles from the feed. any ideas?

Last edited by p4np5n; 02-16-2010 at 07:47 AM.
p4np5n is offline  
Old 02-16-2010, 05:13 PM   #1445
p4np5n
Junior Member
p4np5n began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2010
Device: HTC HD2
A few greek recipes

Ok, I managed to find out what's wrong with the above. I would therefore like to submit (the first) two greek recipes for calibre!

Kathimerini
Spoiler:
from calibre.web.feeds.recipes import BasicNewsRecipe

class Kathimerini(BasicNewsRecipe):
title = 'Kathimerini'
__author__ = 'Pan'
description = 'News from Greece'
max_articles_per_feed = 100
oldest_article = 100
publisher = 'Kathimerini'
category = 'news, GR'
language = 'el'
no_stylesheets = True
remove_tags_before = dict(name='td',attrs={'class':'news'})
remove_tags_after = dict(name='td',attrs={'class':'news'})
remove_attributes = ['width', 'src','header','footer']

feeds = [
('Πολιτική', 'http://wk.kathimerini.gr/xml_files/politics.xml'),
('Ελλάδα', ' http://wk.kathimerini.gr/xml_files/ell.xml'),
('Κόσμος', ' http://wk.kathimerini.gr/xml_files/world.xml'),
('Οικονομία', 'http://wk.kathimerini.gr/xml_files/economy_1.xml'),
('Επιχειρήσεις', 'http://wk.kathimerini.gr/xml_files/economy_2.xml'),
('Διεθνής Οικονομία', 'http://wk.kathimerini.gr/xml_files/economy_3.xml'),
('Πολιτισμός', 'http://wk.kathimerini.gr/xml_files/civ.xml'),
('Μόνιμες Στήλες', 'http://wk.kathimerini.gr/xml_files/st.xml'),
]

def print_version(self, url):
return url.replace('http://news.kathimerini.gr/4dcgi/', 'http://news.kathimerini.gr/4dcgi/4dcgi/')


and Ta Nea
Spoiler:
class TaNea(BasicNewsRecipe):
title = u'Ta Nea'
__author__ = 'Pan'
oldest_article = 1
max_articles_per_feed = 100
no_stylesheets = True

remove_tags_before = dict(name='div',attrs={'id':'print-body'})
remove_tags_after = dict(name='div',attrs={'id':'text'})
feeds = [
(u'Ελλάδα', u'http://www.tanea.gr/default.asp?pid=66&la=1'),
(u'Κόσμος', u'http://www.tanea.gr/default.asp?pid=67&la=1'),
(u'Οικονομία', u'http://www.tanea.gr/default.asp?pid=68&la=1'),
(u'Πολιτισμός', u'http://www.tanea.gr/default.asp?pid=69&la=1'),
(u'Γνώμες', u'http://www.tanea.gr/default.asp?pid=79&la=1'),
(u'Ριπές', u'http://www.tanea.gr/default.asp?pid=80&la=1'),
(u'Αιχμές', u'http://www.tanea.gr/default.asp?pid=81&la=1')
]

def print_version(self, url):
return url.replace('http://www.tanea.gr/default.asp?pid=2', 'http://www.tanea.gr/default.asp?pid=96')
p4np5n is offline  
Advert
Old 02-16-2010, 07:34 PM   #1446
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: 45,410
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This would be very inefficient to build in calibre as calibre would have to go an search every blog page, every time. Instead if there is some web service that does this, say google alerts, that also provides an RSS feed, it may be possible to use that to build a recipe.

Quote:
Originally Posted by Daephex View Post
Would it be possible to build a sort of "dragnet" recipe that would consistently search blogs for a certain phrase, and return me the results once a day? I have no programming skills whatsoever, but I wonder if this couldn't be done through Technorati or even Google's blog search somehow.
kovidgoyal is offline  
Old 02-17-2010, 12:41 AM   #1447
rylsfan
Member
rylsfan began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2010
Device: Kindle2
I am trying to work in a feed from the Kansas City Star. When I go to print version they embed a v-print in the middle.
I was hoping this code would fix it:

def print_version(self, url):
parts=url.split('/')
id = parts[4].split('.')
if not id[0].isdigit():
id = parts[5].split('.')
return url.replace(url, 'http://www.kansascity.com/sports/royals/v-print/story/' + id[0])

But instead, I just get a page of nothing :-)
rylsfan is offline  
Old 02-17-2010, 08:57 AM   #1448
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
New recipe for Wired Magazine - UK edition:

Just to clarify this is a recipe for a monthly edition of Wired Magazine - not the daily feed stuff.

Update: Modified the recipe to fix cover url error
Attached Files
File Type: zip wired_uk.zip (1.8 KB, 197 views)

Last edited by kiklop74; 02-17-2010 at 11:39 AM.
kiklop74 is offline  
Old 02-17-2010, 09:03 AM   #1449
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 rylsfan View Post
I am trying to work in a feed from the Kansas City Star. When I go to print version they embed a v-print in the middle.

But instead, I just get a page of nothing :-)
Try this:

Code:
    def print_version(self, url):
        art, sep, rest = url.rpartition('/story/')
        return art + '/v-print/story/' + rest
kiklop74 is offline  
Old 02-17-2010, 10:40 AM   #1450
rylsfan
Member
rylsfan began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2010
Device: Kindle2
Thumbs up A very heartfelt thank you!



That did it! All I need to do now is remove the printer icon and the site logo. Hopefully I can do that.

(knocks on wood)
rylsfan is offline  
Old 02-17-2010, 03:19 PM   #1451
Chi
Junior Member
Chi began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2010
Location: Norway
Device: Sony Reader PRS-300 and Sony Reader PRS-T1
Hi
Have been trying to make a recipe by myself, but didn't quite understand it.

I really want a recipe that's combined of these two feeds:
Is that possible?

Edit: I tried this, but it would not download.
Code:
class AdvancedUserRecipe1266438034(BasicNewsRecipe):
    title          = u'ScienceDaily - Arachnids and Insects'
    oldest_article = 40
    max_articles_per_feed = 100

    feeds          = [(u'ScienceDaily: Spider and Tick News', u'http://www.sciencedaily.com/rss/plants_animals/spiders.xml'), (u'ScienceDaily: Insect (and Butterfly) News', u'http://www.sciencedaily.com/rss/plants_animals/insects_and_butterflies.xml')]

Last edited by Chi; 02-17-2010 at 03:23 PM.
Chi is offline  
Old 02-17-2010, 03:28 PM   #1452
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
There is already available Science Daily recipe. You can just edit that one to fit your needs - which means add your feeds.

You will find the recipe in {calibre inst folder}/resources/recipes/sciencedaily.recipe
kiklop74 is offline  
Old 02-17-2010, 03:38 PM   #1453
Chi
Junior Member
Chi began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2010
Location: Norway
Device: Sony Reader PRS-300 and Sony Reader PRS-T1
Quote:
Originally Posted by kiklop74 View Post
There is already available Science Daily recipe. You can just edit that one to fit your needs - which means add your feeds.

You will find the recipe in {calibre inst folder}/resources/recipes/sciencedaily.recipe
Thanks
But I can't seem to find the find the location or the file named "sciencedaily.recipe". I'm using Ubuntu 9.10 so maybe that's the problem?

Edit: Forget it, I found it under ./usr/lib/calibre/calibre/web/feeds/recipes

Last edited by Chi; 02-17-2010 at 03:45 PM.
Chi is offline  
Old 02-17-2010, 04:03 PM   #1454
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
Ah so packaging is different on linux
kiklop74 is offline  
Old 02-17-2010, 04:36 PM   #1455
Dereks
Connoisseur
Dereks began at the beginning.
 
Posts: 57
Karma: 10
Join Date: Feb 2010
Device: Kindle Paperwhite 1
what about google recipe. If i didn't make myself clear: i am talking about default calibrie-packaged recipe. In my cases, it picks up all the stuff from folders, omits starred section.
How can it be modified to do exactly the opposite: i need only starred items.
thanks.
Dereks is offline  
Closed Thread


Forum Jump

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


All times are GMT -4. The time now is 10:36 AM.


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