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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class AdvancedUserRecipe1282101454(BasicNewsRecipe):
  4.     title = 'Marietta Daily Journal'
  5.     __author__ = 'Tony Stegall'
  6.     language = 'en'
  7.     description = 'Marietta Ga and Metro Atlanta News'
  8.     publisher = 'MDJ'
  9.     category = 'news,politics,Georgia,USA'
  10.     oldest_article = 1
  11.     max_articles_per_feed = 100
  12.     no_stylesheets = True
  13.     remove_javascript = True
  14.  
  15.     masthead_url = 'http://assets.matchbin.com/sites/624/assets/logo.gif'
  16.  
  17.  
  18.     keep_only_tags    = [
  19.                         dict(name='div', attrs={'id':['print_content_container']})
  20.  
  21.                         ]
  22.  
  23.  
  24.     feeds          = [
  25.                        ('Local News', 'http://mdjonline.com/rss/rss/Local+News?content_type=article&tags=news&page_name=rss&tag_inclusion=or&offset=0&limit=10&instance=Local+News'),
  26.                        ('Sports',   'http://mdjonline.com/rss/rss/Sports?content_type=article&tags=sports&page_name=rss&tag_inclusion=or&offset=0&limit=10&instance=Sports'),
  27.                        ('Obits',    'http://mdjonline.com/rss/rss/Obits?content_type=article&tags=obits&page_name=rss&tag_inclusion=or&offset=0&limit=20&instance=Obits'),
  28.                        ('Editorial & oped',   'http://mdjonline.com/rss/rss/Editorial+and+OPED?content_type=article&tags=oped+editorial&page_name=rss&tag_inclusion=or&offset=0&limit=10&instance=Editorial+and+OPED'),
  29.                        ('Lifestyle',   'http://mdjonline.com/rss/rss/Lifestyle?content_type=article&tags=lifestyle&page_name=rss&tag_inclusion=or&offset=0&limit=10&instance=Lifestyle'),
  30.                        ('Blogs',   'http://mdjonline.com/rss/rss/Lifestyle?content_type=article&tags=lifestyle&page_name=rss&tag_inclusion=or&offset=0&limit=10&instance=Lifestyle')
  31.                     ]
  32.  
  33.     def print_version(self, url):
  34.         split1 = url.split("/")
  35.         artid = split1[4]
  36.  
  37.         #example of link to convert
  38.         #Original link: http://mdjonline.com/bookmark/9274197
  39.         #print version: http://mdjonline.com/printer_friendly/9274197
  40.  
  41.         print_url = 'http://mdjonline.com/printer_friendly/' + artid
  42.         return print_url
  43.  
  44.         #test with ebook-convert nejm.recipe output_dir --test -vv > myrecipe.txt
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.