home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_3718 < prev    next >
Encoding:
Text File  |  2010-07-03  |  2.1 KB  |  54 lines

  1. #!/usr/bin/env python
  2. __license__ = 'GPL v3'
  3. __copyright__ = '2010 elsuave'
  4.  
  5. from calibre.web.feeds.news import BasicNewsRecipe
  6. class EandP(BasicNewsRecipe):
  7.     title              = u'Editor and Publisher'
  8.     __author__         = u'elsuave (modified from Xanthan Gum)'
  9.     description        = 'News about newspapers and journalism.'
  10.     publisher             = 'Editor and Publisher'
  11.     category              = 'news, journalism, industry'
  12.     language = 'en'
  13.     max_articles_per_feed = 25
  14.     no_stylesheets        = True
  15.     use_embedded_content  = False
  16.     encoding              = 'utf8'
  17.     cover_url             = 'http://www.editorandpublisher.com/images/EP_main_logo.gif'
  18.     remove_javascript     = True
  19.  
  20.     html2lrf_options = [
  21.                           '--comment', description
  22.                         , '--category', category
  23.                         , '--publisher', publisher
  24.                         ]
  25.  
  26.     html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
  27.  
  28.     # Font formatting code borrowed from kwetal
  29.  
  30.     extra_css = '''
  31.                  body{font-family:verdana,arial,helvetica,geneva,sans-serif ;}
  32.                  h1{font-size: xx-large;}
  33.                  h2{font-size: large;}
  34.                 '''
  35.  
  36.     # Keep only div:itemmgap
  37.  
  38.     keep_only_tags = [
  39.                           dict(name='div', attrs={'class':'itemmgap'})
  40.                           ]
  41.  
  42.     # Remove commenting/social media lins
  43.  
  44.     remove_tags_after = [dict(name='div', attrs={'class':'clear'})]
  45.  
  46.  
  47.     feeds = [(u'Breaking News', u'http://www.editorandpublisher.com/GenerateRssFeed.aspx'),
  48.              (u'Business News', u'http://www.editorandpublisher.com/GenerateRssFeed.aspx?CategoryId=2'),
  49.              (u'Ad/Circ News', u'http://www.editorandpublisher.com/GenerateRssFeed.aspx?CategoryId=3'),
  50.              (u'Newsroom', u'http://www.editorandpublisher.com/GenerateRssFeed.aspx?CategoryId=4'),
  51.              (u'Technology News', u'http://www.editorandpublisher.com/GenerateRssFeed.aspx?CategoryId=5'),
  52.              (u'Syndicates News', u'http://www.editorandpublisher.com/GenerateRssFeed.aspx?CategoryId=7')]
  53.  
  54.