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

  1. #!/usr/bin/env  python
  2.  
  3. __license__    = 'GPL v3'
  4. __author__ = 'Mori'
  5. __version__ = 'v. 0.1'
  6. '''
  7. blog.eclicto.pl
  8. '''
  9.  
  10. from calibre.web.feeds.news import BasicNewsRecipe
  11. import re
  12.  
  13. class BlogeClictoRecipe(BasicNewsRecipe):
  14.     __author__ = 'Mori'
  15.     language = 'pl'
  16.  
  17.     title = u'Blog eClicto'
  18.     publisher = u'Blog eClicto'
  19.     description = u'Blog o e-papierze i e-bookach'
  20.  
  21.     max_articles_per_feed = 100
  22.     cover_url = 'http://blog.eclicto.pl/wordpress/wp-content/themes/blog_eclicto/g/logo.gif'
  23.     
  24.     no_stylesheets = True
  25.     remove_javascript = True
  26.     encoding = 'utf-8'
  27.     
  28.     extra_css = '''
  29.         img{float: left; padding-right: 10px; padding-bottom: 5px;}
  30.     '''
  31.     
  32.     feeds = [
  33.         (u'Blog eClicto', u'http://blog.eclicto.pl/feed/')
  34.     ]
  35.     
  36.     remove_tags = [
  37.         dict(name = 'span', attrs = {'id' : 'tags'})
  38.     ]
  39.     
  40.     remove_tags_after = [
  41.         dict(name = 'div', attrs = {'class' : 'post'})
  42.     ]
  43.     
  44.     preprocess_regexps = [
  45.         (re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in 
  46.         [
  47.             (r'\s*</', lambda match: '</'),
  48.         ]
  49.     ]