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

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

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 05-22-2010, 01:16 PM   #1966
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by nook.life View Post
The website is http://www.explosm.net/comics/
and the RSS is: http://feeds.feedburner.com/Explosm
Any update on creating a recipe for this?
Creating recipes is a volunteer effort, so you only get a recipe if someone feels like creating it. I took a very brief look at this, but it's got some protection on the page. Have you looked at the two comics recipes I wrote to see if the comic you want is in one of those (comics.com and gocomics)? There are about 300 comics between them, but they have to be customized to turn on the comics of interest.

Last edited by Starson17; 05-22-2010 at 02:08 PM.
Starson17 is offline  
Old 05-22-2010, 01:58 PM   #1967
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
Quote:
Originally Posted by gambarini View Post
infomotori

Italian Car and MotorCicle News
i don't find this recipe in new calibre version.

Is there any problem with this recipe?
gambarini is offline  
Old 05-22-2010, 02:00 PM   #1968
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: 26,450
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by gambarini View Post
i don't find this recipe in new calibre version.

Is there any problem with this recipe?
I must have missed your post, just post them again and I'll add them for the next release.
kovidgoyal is offline  
Old 05-22-2010, 02:02 PM   #1969
square4761
Junior Member
square4761 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2010
Device: sony
American Thinker recipe

http://www.americanthinker.com/

I tried doing the RSS way and it only downloads a few articles but it gets the titles for all the articles. If you click on various articles on the webpage there is no password/username asked for on several that I tried. Any help would be appreciated.
square4761 is offline  
Old 05-22-2010, 02:59 PM   #1970
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
Quote:
Originally Posted by kovidgoyal View Post
I must have missed your post, just post them again and I'll add them for the next release.
oh, yeah!
gambarini is offline  
Old 05-23-2010, 05:02 AM   #1971
yamadharma
Junior Member
yamadharma began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2010
Device: lbook v3
Thanx. It's work.
yamadharma is offline  
Old 05-23-2010, 09:29 AM   #1972
jbambridge
Kindle DX
jbambridge began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Aug 2009
Location: The Netherlands
Device: iPad and Kindle DX
Recipe for the UK Sunday paper: The Observer

Based almost 100% on the excellent Guardian recipe, this is my adapted version to allow the UK Sunday paper: The Observer to be added to Calibre.
Attached Files
File Type: zip observer.recipe.zip (2.4 KB, 91 views)
jbambridge is offline  
Old 05-23-2010, 11:57 AM   #1973
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by nook.life View Post
The website is http://www.explosm.net/comics/
and the RSS is: http://feeds.feedburner.com/Explosm
Any update on creating a recipe for this?
Try this:
Code:
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup

class Explosm(BasicNewsRecipe):
    title               = 'Explosm'
    __author__          = 'Starson17'
    description         = 'Explosm'
    language            = 'en'
    use_embedded_content= False
    no_stylesheets      = True
    linearize_tables      = True
    oldest_article      = 24
    remove_javascript   = True
    remove_empty_feeds    = True
    max_articles_per_feed = 10

    feeds = [
             (u'Explosm Feed', u'http://feeds.feedburner.com/Explosm')
             ]

    def get_article_url(self, article):
        return article.get('link', None)

    keep_only_tags     = [dict(name='div', attrs={'id':'maincontent'})]

    def preprocess_html(self, soup):
        table_tags = soup.findAll('table')
        table_tags[1].extract() 
        NavTag = soup.find(text='« First') 
        NavTag.parent.parent.extract()
        return soup

    extra_css = '''
                    h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
                    h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
                    p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
                    body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
		'''
Starson17 is offline  
Old 05-23-2010, 06:13 PM   #1974
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Improved Freakonomics Blog - Now with images!

Here's an updated Freakonomics Blog recipe. The built-in uses the print link, which, unfortunately, doesn't include images. This one has the images.

Code:
#!/usr/bin/env  python
__license__   = 'GPL v3'
__copyright__ = '2009, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en'

from calibre.web.feeds.news import BasicNewsRecipe

class Freakonomics(BasicNewsRecipe):
    
    title = 'Freakonomics Blog'
    description = 'The Hidden side of everything'
    __author__ = 'Starson17'
    language = 'en'
    cover_url           = 'http://ilkerugur.files.wordpress.com/2009/04/freakonomics.jpg'
    
    feeds = [('Blog', 'http://feeds.feedburner.com/freakonomicsblog')]
    
    keep_only_tags     = [dict(name='div', attrs={'id':'header'}),
                          dict(name='h1'),
                          dict(name='h2'),
                          dict(name='div', attrs={'class':'entry-content'}),
                          ]
    extra_css = '''
                    h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
                    h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
                    p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
                    body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
		'''
Starson17 is offline  
Old 05-24-2010, 02:12 AM   #1975
TouchToneTommy
Junior Member
TouchToneTommy began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2010
Device: none
I'm just getting started with Calibre and news feeds - I'd like to get the local news from our local newspaper. Using the RSS method, the articles have a dark blue background, making them impossible to read. The print link should work fine, but I find that the extra code is inserted in the middle of the link, and I'm not sure how to do that. (The example on the Calibre Help site only covers how to add the extra code at the beginning of the url)


Here's the url's in question

Code:
http://www.sanluisobispo.com/2010/05/22/1150793/mixed-martial-arts-comes-to-poly.html
and

Code:
http://www.sanluisobispo.com/2010/05/22/v-print/1150793/mixed-martial-arts-comes-to-poly.html
You can see the "/v-print/ is inserted between the date and the article name.

Can anyone help or point me in the right direction?

Thanks!!!
TouchToneTommy is offline  
Old 05-24-2010, 04:37 AM   #1976
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: 8,909
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by square4761 View Post
http://www.americanthinker.com/

I tried doing the RSS way and it only downloads a few articles but it gets the titles for all the articles. If you click on various articles on the webpage there is no password/username asked for on several that I tried. Any help would be appreciated.
Here you go.

@Kovid - New recipe - American Thinker.
Attached Files
File Type: rar AmericanThinker.rar (1.5 KB, 74 views)
DoctorOhh is offline  
Old 05-24-2010, 05:05 AM   #1977
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: 8,909
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by TouchToneTommy View Post
Code:
http://www.sanluisobispo.com/2010/05/22/1150793/mixed-martial-arts-comes-to-poly.html
and

Code:
http://www.sanluisobispo.com/2010/05/22/v-print/1150793/mixed-martial-arts-comes-to-poly.html
You can see the "/v-print/ is inserted between the date and the article name.
Is there the option of using wildcards when subbing out for the print version?

Something like this

Code:
    def print_version(self, url):
        return url.replace('http://www.sanluisobispo.com/*/*/*/', 'http://www.sanluisobispo.com/*/*/*/v-print/')
That's my guess.

Good Luck

Last edited by DoctorOhh; 05-24-2010 at 05:30 AM.
DoctorOhh is offline  
Old 05-24-2010, 04:25 PM   #1978
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
new recipe

InfoMotori
Italian Auto, Motor and Sport News.
Attached Files
File Type: zip infomotori24052010.zip (1.1 KB, 72 views)
gambarini is offline  
Old 05-24-2010, 04:59 PM   #1979
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by dwanthny View Post
Is there the option of using wildcards when subbing out for the print version?
I think the usual way to handle this type of situation is to use the split function and split on the slash character. That will give you a list, with each element in the list being text in the original URL that was separated by a slash. Then insert the "v-print" text into the list, then reassemble using slashes.
Like this:
Code:
    def print_version(self, url):
        parts = url.split('/')
        print_url = 'http://' + parts[2] + '/' + parts[3] + '/' + parts[4] + '/' + parts[5] + '/'  + parts[6] \
                + '/v-print/' + parts[7] + '/' + parts[8]
        return print_url

Last edited by Starson17; 05-24-2010 at 05:02 PM.
Starson17 is offline  
Old 05-25-2010, 12:57 AM   #1980
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: 8,909
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by Starson17 View Post
I think the usual way to handle this type of situation is to use the split function and split on the slash character.
Thanks for the pointer.

I am curious though, do wildcards work?

If they do what I wrote should return the print edition.
DoctorOhh is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom column read ? pchrist7 Calibre 2 10-04-2010 03:52 AM
Archive for custom screensavers sleeplessdave Amazon Kindle 1 07-07-2010 01:33 PM
How to back up preferences and custom recipes? greenapple Calibre 3 03-29-2010 06:08 AM
Donations for Custom Recipes ddavtian Calibre 5 01-23-2010 05:54 PM
Help understanding custom recipes andersent Calibre 0 12-17-2009 03:37 PM


All times are GMT -4. The time now is 04:52 PM.


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