~ubuntu-branches/ubuntu/karmic/calibre/karmic

« back to all changes in this revision

Viewing changes to src/calibre/ebooks/lrf/web/profiles/usatoday.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-30 12:49:41 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730124941-qjdsmri25zt8zocn
Tags: 0.6.3+dfsg-0ubuntu1
* New upstream release. Please see http://calibre.kovidgoyal.net/new_in_6/
  for the list of new features and changes.
* remove_postinstall.patch: Update for new version.
* build_debug.patch: Does not apply any more, disable for now. Might not be
  necessary any more.
* debian/copyright: Fix reference to versionless GPL.
* debian/rules: Drop obsolete dh_desktop call.
* debian/rules: Add workaround for weird Python 2.6 setuptools behaviour of
  putting compiled .so files into src/calibre/plugins/calibre/plugins
  instead of src/calibre/plugins.
* debian/rules: Drop hal fdi moving, new upstream version does not use hal
  any more. Drop hal dependency, too.
* debian/rules: Install udev rules into /lib/udev/rules.d.
* Add debian/calibre.preinst: Remove unmodified
  /etc/udev/rules.d/95-calibre.rules on upgrade.
* debian/control: Bump Python dependencies to 2.6, since upstream needs
  it now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
'''
2
 
        Profile to download Jutarnji.hr by Valloric
3
 
'''
4
 
 
5
 
import re
6
 
        
7
 
from calibre.ebooks.lrf.web.profiles import DefaultProfile 
8
 
 
9
 
class USAToday(DefaultProfile):
10
 
 
11
 
        title = 'USA Today'
12
 
        max_recursions = 2
13
 
        timefmt  = ' [%d %b %Y]'
14
 
        max_articles_per_feed = 20
15
 
        html_description = True
16
 
        #no_stylesheets = True
17
 
 
18
 
        preprocess_regexps = [
19
 
                (re.compile(r'<BODY.*?<!--Article Goes Here-->', re.IGNORECASE | re.DOTALL), lambda match : '<BODY>'),
20
 
                (re.compile(r'<!--Article End-->.*?</BODY>', re.IGNORECASE | re.DOTALL), lambda match : '</BODY>'),
21
 
                ]
22
 
        
23
 
        ## Getting the print version 
24
 
        
25
 
        def print_version(self, url):
26
 
                return 'http://www.printthis.clickability.com/pt/printThis?clickMap=printThis&fb=Y&url=' + url
27
 
 
28
 
        
29
 
        ## Comment out the feeds you don't want retrieved.
30
 
        ## Or add any new new RSS feed URL's here, sorted alphabetically when converted to LRF
31
 
        ## If you want one of these at the top, append a space in front of the name.
32
 
        
33
 
        def get_feeds(self):
34
 
                return  [
35
 
                (' Top Headlines', 'http://rssfeeds.usatoday.com/usatoday-NewsTopStories'),
36
 
                ('Sport Headlines', 'http://rssfeeds.usatoday.com/UsatodaycomSports-TopStories'),
37
 
                ('Tech Headlines', 'http://rssfeeds.usatoday.com/usatoday-TechTopStories'),
38
 
                ('Travel Headlines', 'http://rssfeeds.usatoday.com/UsatodaycomTravel-TopStories'),
39
 
                ('Money Headlines', 'http://rssfeeds.usatoday.com/UsatodaycomMoney-TopStories'),
40
 
                ('Entertainment Headlines', 'http://rssfeeds.usatoday.com/usatoday-LifeTopStories'),
41
 
                ('Weather Headlines', 'http://rssfeeds.usatoday.com/usatoday-WeatherTopStories'),
42
 
                        ('Most Popular', 'http://rssfeeds.usatoday.com/Usatoday-MostViewedArticles'),
43
 
                ]
 
 
b'\\ No newline at end of file'