~ubuntu-branches/ubuntu/oneiric/calibre/oneiric

« back to all changes in this revision

Viewing changes to resources/recipes/reptantes.recipe

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-06-21 10:18:08 UTC
  • mfrom: (1.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20100621101808-aue828f532tmo4zt
Tags: 0.7.2+dfsg-1
* New major upstream version. See http://calibre-ebook.com/new-in/seven for
  details.
* Refresh patches to apply cleanly.
* debian/control: Bump python-cssutils to >= 0.9.7~ to ensure the existence
  of the CSSRuleList.rulesOfType attribute. This makes epub conversion work
  again. (Closes: #584756)
* Add debian/local/calibre-mount-helper: Simple and safe replacement for
  upstream's calibre-mount-helper, using udisks --mount and eject.
  (Closes: #584915, LP: #561958)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
__license__   = 'GPL v3'
 
3
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
 
4
'''
 
5
www.reptantes.com.ar
 
6
'''
 
7
 
 
8
from calibre.web.feeds.news import BasicNewsRecipe
 
9
 
 
10
class Reptantes(BasicNewsRecipe):
 
11
    title                 = 'Reptantes'
 
12
    __author__            = 'Darko Miletic'
 
13
    description           = u"cada vez que te haces acupuntura, tu muñeco vudú sufre en algún lado"
 
14
    oldest_article        = 130
 
15
    max_articles_per_feed = 100
 
16
    language              = 'es'
 
17
    encoding              = 'utf-8'
 
18
    no_stylesheets        = True
 
19
    use_embedded_content  = False
 
20
    publication_type      = 'blog'
 
21
    extra_css             = ' body{font-family: "Palatino Linotype",serif} h2{text-align: center; color:#BE7F8D} img{margin-bottom: 2em} '
 
22
 
 
23
    conversion_options = {
 
24
                          'comment'  : description
 
25
                        , 'tags'     : 'literatura'
 
26
                        , 'publisher': 'Hernan Racnati'
 
27
                        , 'language' : language
 
28
                        }
 
29
 
 
30
    feeds = [(u'Posts', u'http://www.reptantes.com.ar/?feed=rss2')]
 
31
 
 
32
    keep_only_tags     = [dict(attrs={'id':'content'})]
 
33
    remove_tags        = [dict(attrs={'class':'iLikeThis'})]
 
34
    remove_tags_before = dict(name='h2')
 
35
    remove_tags_after  = dict(attrs={'class':'iLikeThis'})
 
36
 
 
37
 
 
38
    def preprocess_html(self, soup):
 
39
        for item in soup.findAll(style=True):
 
40
            del item['style']
 
41
        return self.adeify_images(soup)
 
42
 
 
43