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

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. boljevac.blogspot.com
  6. '''
  7.  
  8. import re
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class AgroGerila(BasicNewsRecipe):
  12.     title                 = 'Agro Gerila'
  13.     __author__            = 'Darko Miletic'
  14.     description           = 'Politicki nekorektan blog.'
  15.     oldest_article        = 45
  16.     max_articles_per_feed = 100
  17.     language              = 'sr'
  18.     encoding              = 'utf-8'
  19.     no_stylesheets        = True
  20.     use_embedded_content  = True
  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{margin-bottom: 0.8em; border: 1px solid #333333; padding: 4px } '
  23.  
  24.     conversion_options = {
  25.                           'comment'  : description
  26.                         , 'tags'     : 'film, blog, srbija'
  27.                         , 'publisher': 'Dry-Na-Nord'
  28.                         , 'language' : language
  29.                         }
  30.  
  31.     preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
  32.  
  33.     feeds = [(u'Posts', u'http://boljevac.blogspot.com/feeds/posts/default')]
  34.  
  35.     def preprocess_html(self, soup):
  36.         for item in soup.findAll(style=True):
  37.             del item['style']
  38.         return self.adeify_images(soup)
  39.  
  40.  
  41.