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

  1.  
  2. from calibre.web.feeds.news import BasicNewsRecipe
  3.  
  4. class JournalOfAccountancyRecipe(BasicNewsRecipe):
  5.     __license__  = 'GPL v3'
  6.     __author__ = 'kwetal'
  7.     language = 'en'
  8.     version = 1
  9.  
  10.     title = u'Journal of Accountancy'
  11.     publisher = u'AICPA'
  12.     category = u'News, Accountancy'
  13.     description = u'Publication of the American Institute of Certified Public Accountants'
  14.  
  15.     use_embedded_content = False
  16.     remove_empty_feeds = True
  17.     oldest_article = 30
  18.     max_articles_per_feed = 100
  19.  
  20.     no_stylesheets = True
  21.     remove_javascript = True
  22.  
  23.     extra_css = '''
  24.                 body{font-family:verdana,arial,helvetica,geneva,sans-serif;}
  25.                 div#Rubricname {font-size: small; color: #666666; margin-bottom: 1em;}
  26.                 div#Headline {font-size: x-large; font-weight: bold; margin-bottom: 0.6em}
  27.                 div#SubHeadline {font-size: medium; font-weight: bold; margin-bottom: 1em}
  28.                 div#Authorname, div#Date {font-size: x-small; color: #696969;}
  29.                 '''
  30.  
  31.     conversion_options = {'comments': description, 'tags': category, 'language': 'en',
  32.                           'publisher': publisher}
  33.  
  34.     keep_only_tags = []
  35.     keep_only_tags.append(dict(name = 'div', attrs = {'id': 'Rubricname'}))
  36.     keep_only_tags.append(dict(name = 'div', attrs = {'id': 'Headline'}))
  37.     keep_only_tags.append(dict(name = 'div', attrs = {'id': 'SubHeadline'}))
  38.     keep_only_tags.append(dict(name = 'div', attrs = {'id': 'Authorname'}))
  39.     keep_only_tags.append(dict(name = 'div', attrs = {'id': 'Date'}))
  40.     keep_only_tags.append(dict(name = 'div', attrs = {'id': 'BodyContent'}))
  41.  
  42.     remove_attributes = ['style']
  43.  
  44.     feeds = []
  45.     feeds.append((u'Journal of Accountancy', u'http://feeds2.feedburner.com/JournalOfAccountancy'))
  46.