~stub/ubuntu/precise/calibre/devel

« back to all changes in this revision

Viewing changes to resources/recipes/lifehacker.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:
8
8
 
9
9
class Lifehacker(BasicNewsRecipe):
10
10
    title                 = 'Lifehacker'
11
 
    __author__            = 'NA'
 
11
    __author__            = 'Kovid Goyal'
12
12
    description           = "Computers make us more productive. Yeah, right. Lifehacker recommends the software downloads and web sites that actually save time. Don't live to geek; geek to live."
13
13
    publisher             = 'lifehacker.com'
14
14
    category              = 'news, IT, Internet, gadgets, tips and tricks, howto, diy'
16
16
    max_articles_per_feed = 100
17
17
    no_stylesheets        = True
18
18
    encoding              = 'utf-8'
19
 
    use_embedded_content  = False
 
19
    use_embedded_content  = True
20
20
    language              = 'en'
21
21
    masthead_url          = 'http://cache.gawkerassets.com/assets/lifehacker.com/img/logo.png'
22
 
    extra_css             = '''
23
 
        body{font-family: "Lucida Grande",Helvetica,Arial,sans-serif}
24
 
        img{margin-bottom: 1em}
25
 
        h1{font-family :Arial,Helvetica,sans-serif; font-size:large}
26
 
        h2{font-family :Arial,Helvetica,sans-serif; font-size:x-small}
27
 
                      '''
28
22
    conversion_options = {
29
23
                          'comment'   : description
30
24
                        , 'tags'      : category
32
26
                        , 'language'  : language
33
27
                        }
34
28
 
35
 
    remove_attributes  = ['width','height']
36
 
    keep_only_tags     = [dict(attrs={'class':'content permalink'})]
37
 
    remove_tags_before = dict(name='h1')
38
 
    remove_tags        = [dict(attrs={'class':'contactinfo'})]
39
 
    remove_tags_after  = dict(attrs={'class':'contactinfo'})
 
29
    remove_tags = [
 
30
            {'class': 'feedflare'},
 
31
    ]
40
32
 
41
 
    feeds = [(u'Articles', u'http://feeds.gawker.com/lifehacker/full')]
 
33
    feeds = [(u'Articles', u'http://feeds.gawker.com/lifehacker/vip?format=xml')]
42
34
 
43
35
    def preprocess_html(self, soup):
44
36
        return self.adeify_images(soup)