home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 January / maximum-cd-2011-01.iso / DiscContents / calibre-0.7.26.msi / file_4052 < prev    next >
Encoding:
Text File  |  2010-09-30  |  2.0 KB  |  56 lines

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class AdvancedUserRecipe1282101454(BasicNewsRecipe):
  4.     title = 'West Hawaii Today'
  5.     __author__ = 'Tony Stegall'
  6.     language = 'en'
  7.     description = 'Westhawaiitoday.com'
  8.     publisher = 'West Hawaii '
  9.     category = 'news,Hawaii,USA'
  10.     oldest_article = 7
  11.     max_articles_per_feed = 100
  12.     no_stylesheets = True
  13.     remove_javascript = True
  14.  
  15.     masthead_url = 'http://images.townnews.com/westhawaiitoday.com/art/whttoplogo.gif'
  16.  
  17.  
  18.  
  19.  
  20.  
  21.     feeds          = [
  22.                        ('Local News',     'http://www.westhawaiitoday.com/?rss=local/'),
  23.                        ('Local Sports',   'http://www.westhawaiitoday.com/?rss=sports/local_sports/'),
  24.                        ('Big Fish List',  'http://www.westhawaiitoday.com/?rss=sports/big_fish_list/'),
  25.                        ('Local Features', 'http://www.westhawaiitoday.com/?rss=features/'),
  26.                        ('Obituaries',     'http://www.westhawaiitoday.com/?rss=obituaries/'),
  27.                        ('Letters To Editor',  'http://www.westhawaiitoday.com/?rss=opinion/letters_-_your_voice/'),
  28.                        ('Editorial',     'http://www.westhawaiitoday.com/?rss=opinion/editorial/'),
  29.                        ('Columns',       'http://www.westhawaiitoday.com/?rss=opinion/columns/'),
  30.                        ('Volcano Update Sunday',   'http://www.westhawaiitoday.com/?rss=volcano/')
  31.                     ]
  32.  
  33.     def print_version(self, url):
  34.         split1 = url.split("//")
  35.         url1 = split1[1]
  36.         xxx = split1[2]
  37.         split2 = xxx.split(".")
  38.         artid = split2[0]
  39.         print 'ARTICLE ID IS: ', artid
  40.  
  41.         #example of link to convert
  42.         #Original link: http://www.westhawaiitoday.com/articles/2010/08/27/local//local01.txt
  43.         #print version: http://www.westhawaiitoday.com/articles/2010/08/27/local//local01.prt
  44.  
  45.         print_url = 'http://' + url1 + '//' + artid + '.prt'
  46.         print 'print_url is: ', print_url
  47.         return print_url
  48.  
  49.         #test with ebook-convert hawaii.recipe output_dir --test -vv > myrecipe.txt
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.