home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Calibre / calibre-0.8.18.msi / file_280 / cvecezla.recipe < prev    next >
Text File  |  2011-09-09  |  2KB  |  48 lines

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2011, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. cvecezla.wordpress.com
  6. '''
  7.  
  8. import re
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class CveceZla(BasicNewsRecipe):
  12.     title                 = 'Cvece zla i naopakog'
  13.     __author__            = 'Darko Miletic'
  14.     description           = 'Haoticnost razmisljanja poradja haoticnost pisanja. Muzika, stripovi, igre, knjige, generalno glupiranje...'
  15.     oldest_article        = 7
  16.     max_articles_per_feed = 100
  17.     language              = 'sr'
  18.     encoding              = 'utf-8'
  19.     no_stylesheets        = True
  20.     use_embedded_content  = False
  21.     publication_type      = 'blog'
  22.     extra_css             = ' @font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: "Trebuchet MS",Trebuchet,Verdana,sans1,sans-serif} .article_description{font-family: sans1, sans-serif} img{display: block } '
  23.  
  24.     conversion_options = {
  25.                           'comment'  : description
  26.                         , 'tags'     : 'igre, muzika, film, blog, Srbija'
  27.                         , 'publisher': 'Mehmet Krljic'
  28.                         , 'language' : language
  29.                         }
  30.  
  31.     preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
  32.  
  33.     remove_tags_before = dict(attrs={'class':'navigation'})
  34.     remove_tags_after = dict(attrs={'class':'commentlist'})
  35.     remove_tags = [
  36.                      dict(attrs={'class':['postmetadata alt','sharedaddy sharedaddy-dark sd-like-enabled sd-sharing-enabled','reply','navigation']})
  37.                     ,dict(attrs={'id':'respond'})
  38.                   ]
  39.  
  40.     feeds = [(u'Clanci', u'http://cvecezla.wordpress.com/feed/')]
  41.  
  42.     def preprocess_html(self, soup):
  43.         for item in soup.findAll(style=True):
  44.             del item['style']
  45.         return soup
  46.  
  47.  
  48.