diff --git a/resources/images/news/thewest_au.png b/resources/images/news/thewest_au.png new file mode 100644 index 0000000000..cafa9161a1 Binary files /dev/null and b/resources/images/news/thewest_au.png differ diff --git a/resources/recipes/thewest_au.recipe b/resources/recipes/thewest_au.recipe new file mode 100644 index 0000000000..58bc58a7fa --- /dev/null +++ b/resources/recipes/thewest_au.recipe @@ -0,0 +1,63 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +thewest.com.au +''' + +import re +from calibre.web.feeds.news import BasicNewsRecipe + +class TheWest(BasicNewsRecipe): + title = 'The West Australian' + __author__ = 'Darko Miletic' + description = 'News from Australia' + publisher = 'thewest.com.au' + category = 'news, politics, Australia' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'utf8' + use_embedded_content = False + language = 'en_AU' + remove_empty_feeds = True + publication_type = 'newspaper' + masthead_url = 'http://l.yimg.com/ao/i/mp/properties/news/02/wan/img/wan-logo-h49.png' + extra_css = ' .article{font-family: Arial,Helvetica,sans-serif } .image{font-size: x-small} ' + + preprocess_regexps = [ + (re.compile(r'.*?', re.DOTALL|re.IGNORECASE),lambda match: '') + ] + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + remove_tags = [ + dict(attrs={'class':['tools','lhs']}) + ,dict(attrs={'id' :'tools-bottom'}) + ,dict(attrs={'href' :'http://twitter.com/thewest_com_au'}) + ] + keep_only_tags = [dict(attrs={'class':'mod article'})] + remove_attributes = ['width','height'] + + + feeds = [ + (u'WA News' , u'http://d.yimg.com/au.rss.news.yahoo.com/thewest/wa.xml' ) + ,(u'National' , u'http://d.yimg.com/au.rss.news.yahoo.com/thewest/national.xml' ) + ,(u'World' , u'http://d.yimg.com/au.rss.news.yahoo.com/thewest/world.xml' ) + ,(u'Offbeat' , u'http://d.yimg.com/au.rss.news.yahoo.com/thewest/offbeat.xml' ) + ,(u'Business' , u'http://d.yimg.com/au.rss.news.yahoo.com/thewest/business.xml' ) + ,(u'Sport' , u'http://d.yimg.com/au.rss.news.yahoo.com/thewest/sport.xml' ) + ,(u'Entertainment' , u'http://d.yimg.com/au.rss.news.yahoo.com/thewest/entertainment.xml' ) + ,(u'Travel' , u'http://d.yimg.com/au.rss.news.yahoo.com/thewest/travel.xml' ) + ,(u'Life+Style' , u'http://d.yimg.com/au.rss.news.yahoo.com/thewest/lifestyle.xml' ) + ] + + def get_article_url(self, article): + return article.get('guid', None) + + def preprocess_html(self, soup): + return self.adeify_images(soup) diff --git a/src/calibre/gui2/dialogs/scheduler.ui b/src/calibre/gui2/dialogs/scheduler.ui index ec2c526768..bcfa82e56a 100644 --- a/src/calibre/gui2/dialogs/scheduler.ui +++ b/src/calibre/gui2/dialogs/scheduler.ui @@ -14,7 +14,7 @@ Schedule news download - + :/images/scheduler.svg:/images/scheduler.svg @@ -79,7 +79,7 @@ 0 0 375 - 500 + 502 @@ -371,7 +371,7 @@ Qt::Horizontal - QDialogButtonBox::Ok + QDialogButtonBox::Save