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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  3. '''
  4. digitaljournal.com
  5. '''
  6.  
  7. from calibre.web.feeds.news import BasicNewsRecipe
  8.  
  9. class DigitalJournal(BasicNewsRecipe):
  10.     title                 = 'Digital Journal'
  11.     __author__            = 'Darko Miletic'
  12.     description           = 'A Global Citizen Journalism News Network'
  13.     category              = 'news, politics, USA, world'
  14.     publisher             = 'Digital Journal'
  15.     oldest_article        = 2
  16.     max_articles_per_feed = 100
  17.     no_stylesheets        = True
  18.     use_embedded_content  = False
  19.     encoding              = 'utf8'
  20.     language              = 'en'
  21.       
  22.     conversion_options = {  
  23.                              'comments'        : description
  24.                             ,'tags'            : category
  25.                             ,'language'        : language
  26.                             ,'publisher'       : publisher
  27.                          }
  28.  
  29.     keep_only_tags   = [dict(name='div', attrs={'class':['article','body']})]
  30.  
  31.     remove_tags     = [dict(name=['object','table'])]
  32.                          
  33.     feeds = [ 
  34.                 (u'Latest News'  , u'http://digitaljournal.com/rss/?feed=latest_news'                   )
  35.                ,(u'Business'     , u'http://digitaljournal.com/rss/?feed=top_news&depname=Business'     )
  36.                ,(u'Entertainment', u'http://digitaljournal.com/rss/?feed=top_news&depname=Entertainment')
  37.                ,(u'Environment'  , u'http://digitaljournal.com/rss/?feed=top_news&depname=Environment'  )
  38.                ,(u'Food'         , u'http://digitaljournal.com/rss/?feed=top_news&depname=Food'         )
  39.                ,(u'Health'       , u'http://digitaljournal.com/rss/?feed=top_news&depname=Health'       )
  40.                ,(u'Internet'     , u'http://digitaljournal.com/rss/?feed=top_news&depname=Internet'     )
  41.                ,(u'Politics'     , u'http://digitaljournal.com/rss/?feed=top_news&depname=Politics'     )
  42.                ,(u'Religion'     , u'http://digitaljournal.com/rss/?feed=top_news&depname=Religion'     )
  43.                ,(u'Science'      , u'http://digitaljournal.com/rss/?feed=top_news&depname=Science'      )
  44.                ,(u'Sports'       , u'http://digitaljournal.com/rss/?feed=top_news&depname=Sports'       )
  45.                ,(u'Technology'   , u'http://digitaljournal.com/rss/?feed=top_news&depname=Technology'   )
  46.                ,(u'World'        , u'http://digitaljournal.com/rss/?feed=top_news&depname=World'        )
  47.                ,(u'Arts'         , u'http://digitaljournal.com/rss/?feed=top_news&depname=Arts'         )
  48.             ]
  49.           
  50.     def print_version(self, url):
  51.         return url.replace('digitaljournal.com/','digitaljournal.com/print/')
  52.         
  53.