From bf0777e55b84ed0a4e7b17b22c77ad857c56a7ab Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 9 Jan 2010 19:55:00 -0700 Subject: [PATCH] New recipe for The Dallas Morning News by Krittika Goyal --- resources/recipes/dallas.recipe | 28 ++++++++++++++++++++++++++++ setup/installer/__init__.py | 1 + 2 files changed, 29 insertions(+) create mode 100644 resources/recipes/dallas.recipe diff --git a/resources/recipes/dallas.recipe b/resources/recipes/dallas.recipe new file mode 100644 index 0000000000..8666fbef30 --- /dev/null +++ b/resources/recipes/dallas.recipe @@ -0,0 +1,28 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class DallasNews(BasicNewsRecipe): + title = u'The Dallas Morning News' + language = 'en' + oldest_article = 2 #days + max_articles_per_feed = 25 + + no_stylesheets = True + remove_tags_before = dict(name='h2', attrs={'class':'vitstoryheadline'}) + remove_tags_after = dict(name='div', attrs={'style':'width: 100%; clear: right'}) + remove_tags_after = dict(name='div', attrs={'id':'article_tools_bottom'}) + remove_tags = [ + dict(name='iframe'), + dict(name='div', attrs={'class':'biblockmore'}), + dict(name='div', attrs={'style':'width: 100%; clear: right'}), + dict(name='div', attrs={'id':'article_tools_bottom'}), + #dict(name='ul', attrs={'class':'articleTools'}), + ] + + feeds = [ + ('Latest News', 'http://www.dallasnews.com/newskiosk/rss/dallasnewslatestnews.xml'), + ('Local News', 'http://www.dallasnews.com/newskiosk/rss/dallasnewslocalnews.xml'), + ('Nation and World', 'http://www.dallasnews.com/newskiosk/rss/dallasnewsnationworld.xml'), + ('Politics', 'http://www.dallasnews.com/newskiosk/rss/dallasnewsnationalpolitics.xml'), + ('Science', 'http://www.dallasnews.com/newskiosk/rss/dallasnewsscience.xml'), + ] + diff --git a/setup/installer/__init__.py b/setup/installer/__init__.py index 2acc5d4649..7c6b03ec16 100644 --- a/setup/installer/__init__.py +++ b/setup/installer/__init__.py @@ -111,6 +111,7 @@ class VMInstaller(Command): self.vm = self.VM if not self.vmware_started(): self.start_vmware() + subprocess.call(['chmod', '-R', '+r', 'resources/recipes']) self.start_vm() self.download_installer() if not self.dont_shutdown: