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

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. nightfliersbookspace.blogspot.com
  6. '''
  7.  
  8. import re
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class NightfliersBookspace(BasicNewsRecipe):
  12.     title                 = "Nightflier's Bookspace"
  13.     __author__            = 'Darko Miletic'
  14.     description           = 'SF, Fantasy, Books, Knjige'    
  15.     oldest_article        = 35
  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.     cover_url             = ''    
  23.     extra_css             = """ 
  24.                                 @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} 
  25.                                 body{font-family: "Trebuchet MS",Trebuchet,Verdana,sans1,sans-serif} 
  26.                                 .article_description{font-family: sans1, sans-serif} 
  27.                                 img{margin-bottom: 0.8em; border: 1px solid #333333; padding: 4px } 
  28.                             """
  29.  
  30.     conversion_options = {
  31.                           'comment'  : description
  32.                         , 'tags'     : 'SF, fantasy, prevod, blog, Srbija'
  33.                         , 'publisher': 'Ivan Jovanovic'
  34.                         , 'language' : language
  35.                         }
  36.  
  37.     preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
  38.  
  39.     feeds = [(u'Posts', u'http://nightfliersbookspace.blogspot.com/feeds/posts/default')]
  40.  
  41.     def preprocess_html(self, soup):
  42.         for item in soup.findAll(style=True):
  43.             del item['style']
  44.         return self.adeify_images(soup)
  45.  
  46.  
  47.