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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class ChowkRecipe(BasicNewsRecipe):
  4.     __license__  = 'GPL v3'
  5.     __author__ = 'kwetal'
  6.     language = 'en_IN'
  7.     version = 1
  8.  
  9.     title = u'Chowk'
  10.     publisher = u'chowk.com'
  11.     category = u'Opinion, South Asia'
  12.     description = u'Ideas & Identities of South Asia'
  13.  
  14.     use_embedded_content = False
  15.     remove_empty_feeds = True
  16.     oldest_article = 30
  17.     max_articles_per_feed = 100
  18.  
  19.     #no_stylesheets = True
  20.     remove_javascript = True
  21.     encoding = 'utf-8'
  22.  
  23.     feeds = []
  24.     feeds.append(('Chowk Articles', 'http://www.chowk.com/rss'))
  25.  
  26.     keep_only_tags = []
  27.     keep_only_tags.append(dict(name = 'div', attrs = {'id': 'content'}))
  28.  
  29.     conversion_options = {'comments': description, 'tags': category, 'language': 'en',
  30.                           'publisher': publisher}
  31.  
  32.     extra_css = '''
  33.                 body{font-family:verdana,arial,helvetica,geneva,sans-serif;}
  34.                 a {text-decoration: none; color: blue;}
  35.                 div.pgtitle {font-size: x-large; font-weight: bold;}
  36.                 div.wname, div.date {font-size: x-small; color: #696969;}
  37.                 div.wname {margin-top: 1em;}
  38.                 div.date {margin-bottom: 1em;}
  39.                 div.title {font-weight: bold;}
  40.                 '''
  41.  
  42.  
  43.     def print_version(self, url):
  44.         main, sep, id = url.rpartition('/')
  45.  
  46.         return main + '/print/' + id
  47.