~stub/ubuntu/precise/calibre/devel

« back to all changes in this revision

Viewing changes to resources/recipes/nytimes_sports.recipe

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-04-12 11:29:25 UTC
  • mfrom: (42.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110412112925-c7171kt2bb5rmft4
Tags: 0.7.50+dfsg-2
* debian/control: Build with libpodofo-dev to enable PDF metadata.
  (Closes: #619632)
* debian/control: Add libboost1.42-dev build dependency. Apparently it is
  needed in some setups. (Closes: #619807)
* debian/rules: Call dh_sip to generate a proper sip API dependency, to
  prevent crashes like #616372 for partial upgrades.
* debian/control: Bump python-qt4 dependency to >= 4.8.3-2, which reportedly
  fixes crashes on startup. (Closes: #619701, #620125)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
# encoding: utf-8
 
3
 
 
4
from __future__ import with_statement
 
5
__license__ = 'GPL 3'
 
6
__copyright__ = 'zotzo'
 
7
__docformat__ = 'restructuredtext en'
 
8
"""
 
9
http://fifthdown.blogs.nytimes.com/
 
10
http://offthedribble.blogs.nytimes.com/
 
11
http://thequad.blogs.nytimes.com/
 
12
http://slapshot.blogs.nytimes.com/
 
13
http://goal.blogs.nytimes.com/
 
14
http://bats.blogs.nytimes.com/
 
15
http://straightsets.blogs.nytimes.com/
 
16
http://formulaone.blogs.nytimes.com/
 
17
http://onpar.blogs.nytimes.com/
 
18
"""
 
19
 
 
20
from calibre.web.feeds.news import BasicNewsRecipe
 
21
 
 
22
 
 
23
class NYTimesSports(BasicNewsRecipe):
 
24
    title = 'New York Times Sports Beat'
 
25
    language = 'en'
 
26
    __author__ = 'rylsfan'
 
27
    description = 'Indepth sports from the New York Times'
 
28
    publisher = 'The New York Times'
 
29
    category = 'Sports'
 
30
    oldest_article = 3
 
31
    max_articles_per_feed = 25
 
32
    no_stylesheets = True
 
33
    language = 'en'
 
34
    #cover_url ='http://bit.ly/h8F4DO'
 
35
    feeds = [
 
36
               (u'The Fifth Down', u'http://fifthdown.blogs.nytimes.com/feed/'),
 
37
               (u'Off The Dribble', u'http://offthedribble.blogs.nytimes.com/feed/'),
 
38
               (u'The Quad', u'http://thequad.blogs.nytimes.com/feed/'),
 
39
               (u'Slap Shot', u'http://slapshot.blogs.nytimes.com/feed/'),
 
40
               (u'Goal', u'http://goal.blogs.nytimes.com/feed/'),
 
41
               (u'Bats', u'http://bats.blogs.nytimes.com/feed/'),
 
42
               (u'Straight Sets', u'http://straightsets.blogs.nytimes.com/feed/'),
 
43
               (u'Formula One', u'http://formulaone.blogs.nytimes.com/feed/'),
 
44
               (u'On Par', u'http://onpar.blogs.nytimes.com/feed/'),
 
45
           ]
 
46
    keep_only_tags = [dict(name='div', attrs={'id':'header'}),
 
47
            dict(name='h1'),
 
48
            dict(name='h2'),
 
49
            dict(name='div', attrs={'class':'entry-content'})]
 
50
    extra_css =    '''
 
51
           h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
 
52
           h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
 
53
           p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
 
54
           body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
 
55
                   '''