From e299be70ff1d481c6d26a8ef5ffa1310e572ccbf Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 4 Feb 2009 22:38:32 -0800 Subject: [PATCH] Group news sources by language. Fixes #1774 (News grouped by country of origin) --- src/calibre/gui2/dialogs/recipelistview.py | 16 -- src/calibre/gui2/dialogs/scheduler.py | 137 ++++++++++++------ src/calibre/gui2/dialogs/scheduler.ui | 23 +-- src/calibre/web/feeds/news.py | 3 + .../web/feeds/recipes/recipe_ambito.py | 1 + .../web/feeds/recipes/recipe_amspec.py | 47 +++--- src/calibre/web/feeds/recipes/recipe_ap.py | 1 + .../web/feeds/recipes/recipe_ars_technica.py | 1 + .../web/feeds/recipes/recipe_atlantic.py | 2 +- src/calibre/web/feeds/recipes/recipe_b92.py | 3 +- .../web/feeds/recipes/recipe_barrons.py | 1 + src/calibre/web/feeds/recipes/recipe_bbc.py | 1 + .../web/feeds/recipes/recipe_business_week.py | 1 + .../web/feeds/recipes/recipe_chr_mon.py | 1 + .../web/feeds/recipes/recipe_clarin.py | 1 + src/calibre/web/feeds/recipes/recipe_cnn.py | 1 + .../web/feeds/recipes/recipe_common_dreams.py | 1 + .../feeds/recipes/recipe_criticadigital.py | 1 + .../web/feeds/recipes/recipe_cyberpresse.py | 1 + .../feeds/recipes/recipe_daily_telegraph.py | 1 + .../web/feeds/recipes/recipe_de_standaard.py | 1 + .../feeds/recipes/recipe_discover_magazine.py | 3 +- .../web/feeds/recipes/recipe_economist.py | 1 + .../feeds/recipes/recipe_el_mercurio_chile.py | 1 + .../web/feeds/recipes/recipe_el_pais.py | 1 + .../web/feeds/recipes/recipe_elargentino.py | 1 + .../web/feeds/recipes/recipe_elcronista.py | 1 + .../web/feeds/recipes/recipe_elmundo.py | 1 + .../web/feeds/recipes/recipe_endgadget.py | 3 +- src/calibre/web/feeds/recipes/recipe_espn.py | 1 + .../web/feeds/recipes/recipe_estadao.py | 3 +- .../web/feeds/recipes/recipe_faznet.py | 3 +- .../feeds/recipes/recipe_financial_times.py | 1 + .../web/feeds/recipes/recipe_forbes.py | 1 + .../web/feeds/recipes/recipe_freakonomics.py | 1 + src/calibre/web/feeds/recipes/recipe_ftd.py | 1 + .../web/feeds/recipes/recipe_fudzilla.py | 1 + .../feeds/recipes/recipe_globe_and_mail.py | 1 + .../web/feeds/recipes/recipe_granma.py | 1 + .../web/feeds/recipes/recipe_guardian.py | 1 + .../web/feeds/recipes/recipe_harpers.py | 1 + .../web/feeds/recipes/recipe_harpers_full.py | 1 + src/calibre/web/feeds/recipes/recipe_heise.py | 1 + src/calibre/web/feeds/recipes/recipe_iht.py | 1 + .../web/feeds/recipes/recipe_infobae.py | 1 + .../web/feeds/recipes/recipe_irish_times.py | 1 + .../web/feeds/recipes/recipe_japan_times.py | 3 +- .../web/feeds/recipes/recipe_jb_online.py | 1 + .../feeds/recipes/recipe_joelonsoftware.py | 1 + src/calibre/web/feeds/recipes/recipe_jpost.py | 1 + .../feeds/recipes/recipe_juventudrebelde.py | 1 + .../recipes/recipe_juventudrebelde_english.py | 3 +- .../web/feeds/recipes/recipe_la_cuarta.py | 1 + .../web/feeds/recipes/recipe_la_segunda.py | 3 +- .../web/feeds/recipes/recipe_la_tercera.py | 1 + .../web/feeds/recipes/recipe_lanacion.py | 1 + .../feeds/recipes/recipe_lanacion_chile.py | 1 + .../web/feeds/recipes/recipe_laprensa.py | 1 + .../web/feeds/recipes/recipe_latimes.py | 1 + .../web/feeds/recipes/recipe_le_monde.py | 1 + .../web/feeds/recipes/recipe_liberation.py | 1 + .../feeds/recipes/recipe_linux_magazine.py | 3 +- src/calibre/web/feeds/recipes/recipe_lrb.py | 1 + .../web/feeds/recipes/recipe_moscow_times.py | 3 +- src/calibre/web/feeds/recipes/recipe_nasa.py | 1 + .../web/feeds/recipes/recipe_new_scientist.py | 1 + .../recipe_new_york_review_of_books.py | 1 + .../web/feeds/recipes/recipe_new_yorker.py | 1 + .../web/feeds/recipes/recipe_newsweek.py | 1 + src/calibre/web/feeds/recipes/recipe_nspm.py | 1 + .../web/feeds/recipes/recipe_nspm_int.py | 1 + .../web/feeds/recipes/recipe_nytimes.py | 1 + .../web/feeds/recipes/recipe_nytimes_sub.py | 1 + .../web/feeds/recipes/recipe_o_globo.py | 1 + .../web/feeds/recipes/recipe_outlook_india.py | 1 + .../web/feeds/recipes/recipe_pagina12.py | 3 +- .../web/feeds/recipes/recipe_portfolio.py | 1 + .../web/feeds/recipes/recipe_reuters.py | 1 + .../recipes/recipe_san_fran_chronicle.py | 3 +- .../web/feeds/recipes/recipe_science_aas.py | 1 + .../web/feeds/recipes/recipe_science_news.py | 1 + .../web/feeds/recipes/recipe_sciencedaily.py | 1 + .../recipes/recipe_scientific_american.py | 1 + .../feeds/recipes/recipe_security_watch.py | 1 + .../web/feeds/recipes/recipe_shacknews.py | 1 + src/calibre/web/feeds/recipes/recipe_smh.py | 1 + .../web/feeds/recipes/recipe_spiegel_int.py | 1 + .../web/feeds/recipes/recipe_spiegelde.py | 1 + .../recipes/recipe_st_petersburg_times.py | 1 + .../web/feeds/recipes/recipe_sueddeutsche.py | 1 + .../web/feeds/recipes/recipe_telegraph_uk.py | 1 + .../web/feeds/recipes/recipe_telepolis.py | 1 + .../web/feeds/recipes/recipe_teleread.py | 1 + .../web/feeds/recipes/recipe_the_age.py | 1 + .../web/feeds/recipes/recipe_the_nation.py | 1 + .../web/feeds/recipes/recipe_the_oz.py | 1 + .../web/feeds/recipes/recipe_the_scotsman.py | 1 + .../feeds/recipes/recipe_themarketticker.py | 1 + .../web/feeds/recipes/recipe_time_magazine.py | 1 + .../web/feeds/recipes/recipe_times_online.py | 1 + .../web/feeds/recipes/recipe_tomshardware.py | 1 + .../feeds/recipes/recipe_tomshardware_de.py | 2 +- src/calibre/web/feeds/recipes/recipe_upi.py | 2 +- .../web/feeds/recipes/recipe_usatoday.py | 1 + src/calibre/web/feeds/recipes/recipe_utne.py | 1 + .../web/feeds/recipes/recipe_wash_post.py | 1 + src/calibre/web/feeds/recipes/recipe_wired.py | 1 + src/calibre/web/feeds/recipes/recipe_wsj.py | 1 + src/calibre/web/feeds/recipes/recipe_xkcd.py | 1 + src/calibre/web/feeds/recipes/recipe_zdnet.py | 1 + .../web/feeds/recipes/recipe_zeitde.py | 1 + 111 files changed, 254 insertions(+), 105 deletions(-) delete mode 100644 src/calibre/gui2/dialogs/recipelistview.py diff --git a/src/calibre/gui2/dialogs/recipelistview.py b/src/calibre/gui2/dialogs/recipelistview.py deleted file mode 100644 index 963079307d..0000000000 --- a/src/calibre/gui2/dialogs/recipelistview.py +++ /dev/null @@ -1,16 +0,0 @@ -__license__ = 'GPL v3' -__copyright__ = '2009, John Schember john@nachtimwald.com' -''' -List View for showing recipies. Allows for keyboad events when selecting new -items. -''' - -from PyQt4.Qt import QListView, SIGNAL - -class RecipeListView(QListView): - def __init__(self, *args): - QListView.__init__(self, *args) - - def selectionChanged(self, selected, deselected): - self.emit(SIGNAL('itemChanged(QModelIndex)'), selected.indexes()[0]) - diff --git a/src/calibre/gui2/dialogs/scheduler.py b/src/calibre/gui2/dialogs/scheduler.py index 47d076f28c..58e5935b66 100644 --- a/src/calibre/gui2/dialogs/scheduler.py +++ b/src/calibre/gui2/dialogs/scheduler.py @@ -10,8 +10,8 @@ Scheduler for automated recipe downloads import sys, copy, time from datetime import datetime, timedelta, date from PyQt4.Qt import QDialog, QApplication, QLineEdit, QPalette, SIGNAL, QBrush, \ - QColor, QAbstractListModel, Qt, QVariant, QFont, QIcon, \ - QFile, QObject, QTimer, QMutex, QMenu, QAction, QTime + QColor, QAbstractItemModel, Qt, QVariant, QFont, QIcon, \ + QFile, QObject, QTimer, QMutex, QMenu, QAction, QTime, QModelIndex from calibre import english_sort from calibre.gui2.dialogs.scheduler_ui import Ui_Dialog @@ -30,6 +30,7 @@ class Recipe(object): self.id = id self.title = getattr(recipe_class, 'title', None) self.description = getattr(recipe_class, 'description', None) + self.language = getattr(recipe_class, 'language', _('Unknown')) self.last_downloaded = datetime.fromordinal(1) self.downloading = False self.builtin = builtin @@ -86,12 +87,12 @@ def load_recipes(): recipes.append(r) return recipes -class RecipeModel(QAbstractListModel, SearchQueryParser): +class RecipeModel(QAbstractItemModel, SearchQueryParser): LOCATIONS = ['all'] def __init__(self, db, *args): - QAbstractListModel.__init__(self, *args) + QAbstractItemModel.__init__(self, *args) SearchQueryParser.__init__(self) self.default_icon = QIcon(':/images/news.svg') self.custom_icon = QIcon(':/images/user_profile.svg') @@ -99,8 +100,11 @@ class RecipeModel(QAbstractListModel, SearchQueryParser): for x in db.get_recipes(): recipe = compile_recipe(x[1]) self.recipes.append(Recipe(x[0], recipe, False)) - self.refresh() - self._map = list(range(len(self.recipes))) + self.refresh() + self.bold_font = QFont() + self.bold_font.setBold(True) + self.bold_font = QVariant(self.bold_font) + def refresh(self): sr = load_recipes() @@ -110,7 +114,35 @@ class RecipeModel(QAbstractListModel, SearchQueryParser): recipe.last_downloaded = sr[sr.index(recipe)].last_downloaded self.recipes.sort() + self.num_of_recipes = len(self.recipes) + self.category_map = {} + for r in self.recipes: + category = getattr(r, 'language', _('Unknown')) + if not r.builtin: + category = _('Custom') + if r.schedule is not None: + category = _('Scheduled') + if category not in self.category_map.keys(): + self.category_map[category] = [] + self.category_map[category].append(r) + + self.categories = sorted(self.category_map.keys(), cmp=self.sort_categories) + self._map = dict(self.category_map) + + def sort_categories(self, x, y): + + def decorate(x): + if x == _('Scheduled'): + x = '0' + x + elif x == _('Custom'): + x = '1' + x + else: + x = '2' + x + return x + + return cmp(decorate(x), decorate(y)) + def universal_set(self): return set(self.recipes) @@ -129,48 +161,64 @@ class RecipeModel(QAbstractListModel, SearchQueryParser): try: results = self.parse(unicode(query)) except ParseException: - self._map = list(range(len(self.recipes))) + self._map = dict(self.category_map) else: - self._map = [] - for i, recipe in enumerate(self.recipes): - if recipe in results: - self._map.append(i) + self._map = {} + for category in self.categories: + self._map[category] = [] + for recipe in self.category_map[category]: + if recipe in results: + self._map[category].append(recipe) self.reset() def resort(self): self.recipes.sort() self.reset() + + def index(self, row, column, parent): + return self.createIndex(row, column, parent.row() if parent.isValid() else -1) + + def parent(self, index): + if index.internalId() == -1: + return QModelIndex() + return self.createIndex(index.internalId(), 0, -1) + + def columnCount(self, parent): + if not parent.isValid() or not parent.parent().isValid(): + return 1 + return 0 + + def rowCount(self, parent): + if not parent.isValid(): + return len(self.categories) + if not parent.parent().isValid(): + category = self.categories[parent.row()] + return len(self._map[category]) + return 0 - def columnCount(self, *args): - return 1 - - def rowCount(self, *args): - return len(self._map) - def data(self, index, role): - recipe = self.recipes[self._map[index.row()]] - if role == Qt.FontRole: - if recipe.schedule is not None: - font = QFont() - font.setBold(True) - return QVariant(font) - if not recipe.builtin: - font = QFont() - font.setItalic(True) - return QVariant(font) - elif role == Qt.DisplayRole: - return QVariant(recipe.title) - elif role == Qt.UserRole: - return recipe - elif role == Qt.DecorationRole: - icon = self.default_icon - icon_path = (':/images/news/%s.png'%recipe.id).replace('recipe_', '') - if not recipe.builtin: - icon = self.custom_icon - elif QFile().exists(icon_path): - icon = QIcon(icon_path) - return QVariant(icon) - + if index.parent().isValid(): + category = self.categories[index.parent().row()] + recipe = self._map[category][index.row()] + if role == Qt.DisplayRole: + return QVariant(recipe.title) + elif role == Qt.UserRole: + return recipe + elif role == Qt.DecorationRole: + icon = self.default_icon + icon_path = (':/images/news/%s.png'%recipe.id).replace('recipe_', '') + if not recipe.builtin: + icon = self.custom_icon + elif QFile().exists(icon_path): + icon = QIcon(icon_path) + return QVariant(icon) + else: + category = self.categories[index.row()] + if role == Qt.DisplayRole: + num = len(self._map[category]) + return QVariant(category + ' [%d]'%num) + elif role == Qt.FontRole: + return self.bold_font return NONE def update_recipe_schedule(self, recipe): @@ -241,7 +289,7 @@ class SchedulerDialog(QDialog, Ui_Dialog): self._model = RecipeModel(db) self.current_recipe = None self.recipes.setModel(self._model) - self.connect(self.recipes, SIGNAL('itemChanged(QModelIndex)'), self.show_recipe) + self.recipes.currentChanged = self.currentChanged self.connect(self.username, SIGNAL('textEdited(QString)'), self.set_account_info) self.connect(self.password, SIGNAL('textEdited(QString)'), self.set_account_info) self.connect(self.schedule, SIGNAL('stateChanged(int)'), self.do_schedule) @@ -257,10 +305,14 @@ class SchedulerDialog(QDialog, Ui_Dialog): self.connect(self.download, SIGNAL('clicked()'), self.download_now) self.search.setFocus(Qt.OtherFocusReason) self.old_news.setValue(gconf['oldest_news']) - self.rnumber.setText(_('%d recipes')%self._model.rowCount(None)) + self.rnumber.setText(_('%d recipes')%self._model.num_of_recipes) for day in (_('day'), _('Monday'), _('Tuesday'), _('Wednesday'), _('Thursday'), _('Friday'), _('Saturday'), _('Sunday')): self.day.addItem(day) + + def currentChanged(self, current, previous): + if current.parent().isValid(): + self.show_recipe(current) def download_now(self): recipe = self._model.data(self.recipes.currentIndex(), Qt.UserRole) @@ -304,6 +356,7 @@ class SchedulerDialog(QDialog, Ui_Dialog): hour, minute = t.hour(), t.minute() recipe.schedule = encode_schedule(day_of_week, hour, minute) else: + recipe.schedule = None if recipe in recipes: recipes.remove(recipe) save_recipes(recipes) diff --git a/src/calibre/gui2/dialogs/scheduler.ui b/src/calibre/gui2/dialogs/scheduler.ui index 79ea04977e..808fd0a0d2 100644 --- a/src/calibre/gui2/dialogs/scheduler.ui +++ b/src/calibre/gui2/dialogs/scheduler.ui @@ -24,8 +24,20 @@ - - + + + false + + + + 16 + 16 + + + + true + + true @@ -321,13 +333,6 @@ - - - RecipeListView - QListView -
recipelistview.h
-
-
diff --git a/src/calibre/web/feeds/news.py b/src/calibre/web/feeds/news.py index bc7b2e62bf..660b98fd44 100644 --- a/src/calibre/web/feeds/news.py +++ b/src/calibre/web/feeds/news.py @@ -47,6 +47,9 @@ class BasicNewsRecipe(object, LoggingInterface): #: The author of this recipe __author__ = __appname__ + #: The language that the news is in + language = _('Unknown') + #: Maximum number of articles to download from each feed. This is primarily #: useful for feeds that don't have article dates. For most feeds, you should #: use :attr:`BasicNewsRecipe.oldest_article` diff --git a/src/calibre/web/feeds/recipes/recipe_ambito.py b/src/calibre/web/feeds/recipes/recipe_ambito.py index 56528c27c0..17d33a1cde 100644 --- a/src/calibre/web/feeds/recipes/recipe_ambito.py +++ b/src/calibre/web/feeds/recipes/recipe_ambito.py @@ -18,6 +18,7 @@ class Ambito(BasicNewsRecipe): no_stylesheets = True use_embedded_content = False encoding = 'iso--8859-1' + language = _('Spanish') cover_url = 'http://www.ambito.com/img/logo_.jpg' html2lrf_options = [ diff --git a/src/calibre/web/feeds/recipes/recipe_amspec.py b/src/calibre/web/feeds/recipes/recipe_amspec.py index b01fadee77..0e5358dd26 100644 --- a/src/calibre/web/feeds/recipes/recipe_amspec.py +++ b/src/calibre/web/feeds/recipes/recipe_amspec.py @@ -9,27 +9,28 @@ spectator.org from calibre.web.feeds.news import BasicNewsRecipe class TheAmericanSpectator(BasicNewsRecipe): - title = 'The American Spectator' - __author__ = 'Darko Miletic' - description = 'news from USA' - oldest_article = 7 - max_articles_per_feed = 100 - no_stylesheets = True - use_embedded_content = False - INDEX = 'http://spectator.org' + title = 'The American Spectator' + __author__ = 'Darko Miletic' + language = _('English') + description = 'News from USA' + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + INDEX = 'http://spectator.org' - html2lrf_options = [ + html2lrf_options = [ '--comment' , description , '--category' , 'news, politics, USA' , '--publisher' , title ] - keep_only_tags = [ + keep_only_tags = [ dict(name='div', attrs={'class':'post inner'}) ,dict(name='div', attrs={'class':'author-bio'}) ] - remove_tags = [ + remove_tags = [ dict(name='object') ,dict(name='div', attrs={'class':'col3' }) ,dict(name='div', attrs={'class':'post-options' }) @@ -37,17 +38,17 @@ class TheAmericanSpectator(BasicNewsRecipe): ,dict(name='div', attrs={'class':'social' }) ] - feeds = [ (u'Articles', u'http://feedproxy.google.com/amspecarticles')] + feeds = [ (u'Articles', u'http://feedproxy.google.com/amspecarticles')] - def get_cover_url(self): - cover_url = None - soup = self.index_to_soup(self.INDEX) - link_item = soup.find('a',attrs={'class':'cover'}) - if link_item: - soup2 = self.index_to_soup(link_item['href']) - link_item2 = soup2.find('div',attrs={'class':'post inner issues'}) - cover_url = self.INDEX + link_item2.img['src'] - return cover_url + def get_cover_url(self): + cover_url = None + soup = self.index_to_soup(self.INDEX) + link_item = soup.find('a',attrs={'class':'cover'}) + if link_item: + soup2 = self.index_to_soup(link_item['href']) + link_item2 = soup2.find('div',attrs={'class':'post inner issues'}) + cover_url = self.INDEX + link_item2.img['src'] + return cover_url - def print_version(self, url): - return url + '/print' + def print_version(self, url): + return url + '/print' diff --git a/src/calibre/web/feeds/recipes/recipe_ap.py b/src/calibre/web/feeds/recipes/recipe_ap.py index cbd9055b61..6bff0ab0a8 100644 --- a/src/calibre/web/feeds/recipes/recipe_ap.py +++ b/src/calibre/web/feeds/recipes/recipe_ap.py @@ -8,6 +8,7 @@ class AssociatedPress(BasicNewsRecipe): description = 'Global news' __author__ = 'Kovid Goyal' use_embedded_content = False + language = _('English') max_articles_per_feed = 15 html2lrf_options = ['--force-page-break-before-tag="chapter"'] diff --git a/src/calibre/web/feeds/recipes/recipe_ars_technica.py b/src/calibre/web/feeds/recipes/recipe_ars_technica.py index b7c25e497a..1360c6aa47 100644 --- a/src/calibre/web/feeds/recipes/recipe_ars_technica.py +++ b/src/calibre/web/feeds/recipes/recipe_ars_technica.py @@ -13,6 +13,7 @@ class ArsTechnica(BasicNewsRecipe): title = 'Ars Technica' description = 'The art of technology' oldest_article = 7 + language = _('English') no_stylesheets = True __author__ = 'Michael Warner' max_articles_per_feed = 100 diff --git a/src/calibre/web/feeds/recipes/recipe_atlantic.py b/src/calibre/web/feeds/recipes/recipe_atlantic.py index 8978925528..6d4a88dcd5 100644 --- a/src/calibre/web/feeds/recipes/recipe_atlantic.py +++ b/src/calibre/web/feeds/recipes/recipe_atlantic.py @@ -14,7 +14,7 @@ class TheAtlantic(BasicNewsRecipe): __author__ = 'Kovid Goyal' description = 'Current affairs and politics focussed on the US' INDEX = 'http://www.theatlantic.com/doc/current' - + language = _('English') remove_tags_before = dict(name='div', id='storytop') remove_tags = [dict(name='div', id=['seealso', 'storybottom', 'footer', 'ad_banner_top', 'sidebar'])] no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_b92.py b/src/calibre/web/feeds/recipes/recipe_b92.py index 47d264af1c..c20bfab8dc 100644 --- a/src/calibre/web/feeds/recipes/recipe_b92.py +++ b/src/calibre/web/feeds/recipes/recipe_b92.py @@ -6,12 +6,13 @@ __copyright__ = '2008, Darko Miletic ' b92.net ''' -import string,re +import re from calibre.web.feeds.news import BasicNewsRecipe class B92(BasicNewsRecipe): title = u'B92' __author__ = 'Darko Miletic' + language = _('Serbian') description = 'Dnevne vesti iz Srbije i sveta' oldest_article = 7 max_articles_per_feed = 100 diff --git a/src/calibre/web/feeds/recipes/recipe_barrons.py b/src/calibre/web/feeds/recipes/recipe_barrons.py index 44ebdaef21..164be20d3e 100644 --- a/src/calibre/web/feeds/recipes/recipe_barrons.py +++ b/src/calibre/web/feeds/recipes/recipe_barrons.py @@ -15,6 +15,7 @@ class Barrons(BasicNewsRecipe): title = 'Barron\'s' max_articles_per_feed = 50 needs_subscription = True + language = _('English') __author__ = 'Kovid Goyal' description = 'Weekly publication for investors from the publisher of the Wall Street Journal' timefmt = ' [%a, %b %d, %Y]' diff --git a/src/calibre/web/feeds/recipes/recipe_bbc.py b/src/calibre/web/feeds/recipes/recipe_bbc.py index 01aa039cf9..bc893c5ad4 100644 --- a/src/calibre/web/feeds/recipes/recipe_bbc.py +++ b/src/calibre/web/feeds/recipes/recipe_bbc.py @@ -13,6 +13,7 @@ class BBC(BasicNewsRecipe): __author__ = 'Kovid Goyal' description = 'Global news and current affairs from the British Broadcasting Corporation' no_stylesheets = True + language = _('English') remove_tags = [dict(name='div', attrs={'class':'footer'})] extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }' diff --git a/src/calibre/web/feeds/recipes/recipe_business_week.py b/src/calibre/web/feeds/recipes/recipe_business_week.py index 794bdf9582..d24e1c0f6a 100644 --- a/src/calibre/web/feeds/recipes/recipe_business_week.py +++ b/src/calibre/web/feeds/recipes/recipe_business_week.py @@ -13,6 +13,7 @@ class BusinessWeek(BasicNewsRecipe): title = 'Business Week' description = 'Business News, Stock Market and Financial Advice' __author__ = 'ChuckEggDotCom' + language = _('English') oldest_article = 7 max_articles_per_feed = 10 diff --git a/src/calibre/web/feeds/recipes/recipe_chr_mon.py b/src/calibre/web/feeds/recipes/recipe_chr_mon.py index b9f94fcd1c..ccf17bc2e0 100644 --- a/src/calibre/web/feeds/recipes/recipe_chr_mon.py +++ b/src/calibre/web/feeds/recipes/recipe_chr_mon.py @@ -8,6 +8,7 @@ class ChristianScienceMonitor(BasicNewsRecipe): description = 'Providing context and clarity on national and international news, peoples and cultures' max_articles_per_feed = 20 __author__ = 'Kovid Goyal' + language = _('English') no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_clarin.py b/src/calibre/web/feeds/recipes/recipe_clarin.py index 322e06dd66..cd72163c88 100644 --- a/src/calibre/web/feeds/recipes/recipe_clarin.py +++ b/src/calibre/web/feeds/recipes/recipe_clarin.py @@ -15,6 +15,7 @@ class Clarin(BasicNewsRecipe): description = 'Noticias de Argentina y mundo' oldest_article = 2 max_articles_per_feed = 100 + language = _('Spanish') use_embedded_content = False no_stylesheets = True cover_url = strftime('http://www.clarin.com/diario/%Y/%m/%d/portada.jpg') diff --git a/src/calibre/web/feeds/recipes/recipe_cnn.py b/src/calibre/web/feeds/recipes/recipe_cnn.py index ac286d29ad..6ce0f87d4e 100644 --- a/src/calibre/web/feeds/recipes/recipe_cnn.py +++ b/src/calibre/web/feeds/recipes/recipe_cnn.py @@ -12,6 +12,7 @@ class CNN(BasicNewsRecipe): description = 'Global news' timefmt = ' [%d %b %Y]' __author__ = 'Kovid Goyal' + language = _('English') no_stylesheets = True use_embedded_content = False oldest_article = 15 diff --git a/src/calibre/web/feeds/recipes/recipe_common_dreams.py b/src/calibre/web/feeds/recipes/recipe_common_dreams.py index 18a4233d69..3f44dfd09d 100644 --- a/src/calibre/web/feeds/recipes/recipe_common_dreams.py +++ b/src/calibre/web/feeds/recipes/recipe_common_dreams.py @@ -5,6 +5,7 @@ class CommonDreams(BasicNewsRecipe): title = u'Common Dreams' description = u'Progressive news and views' __author__ = u'XanthanGum' + language = _('English') oldest_article = 7 max_articles_per_feed = 100 diff --git a/src/calibre/web/feeds/recipes/recipe_criticadigital.py b/src/calibre/web/feeds/recipes/recipe_criticadigital.py index b92a33231c..ed04fd8b55 100644 --- a/src/calibre/web/feeds/recipes/recipe_criticadigital.py +++ b/src/calibre/web/feeds/recipes/recipe_criticadigital.py @@ -14,6 +14,7 @@ class CriticaDigital(BasicNewsRecipe): description = 'Noticias de Argentina' oldest_article = 2 max_articles_per_feed = 100 + language = _('Spanish') no_stylesheets = True use_embedded_content = False encoding = 'cp1252' diff --git a/src/calibre/web/feeds/recipes/recipe_cyberpresse.py b/src/calibre/web/feeds/recipes/recipe_cyberpresse.py index cbd26ff784..ead1589e0f 100644 --- a/src/calibre/web/feeds/recipes/recipe_cyberpresse.py +++ b/src/calibre/web/feeds/recipes/recipe_cyberpresse.py @@ -6,6 +6,7 @@ class Cyberpresse(BasicNewsRecipe): title = u'Cyberpresse' __author__ = 'balok' description = 'Canadian news in French' + language = _('French') oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_daily_telegraph.py b/src/calibre/web/feeds/recipes/recipe_daily_telegraph.py index dfad458276..84a379537e 100644 --- a/src/calibre/web/feeds/recipes/recipe_daily_telegraph.py +++ b/src/calibre/web/feeds/recipes/recipe_daily_telegraph.py @@ -12,6 +12,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class DailyTelegraph(BasicNewsRecipe): title = u'Daily Telegraph' __author__ = u'AprilHare' + language = _('English') description = u'News from down under' oldest_article = 2 max_articles_per_feed = 10 diff --git a/src/calibre/web/feeds/recipes/recipe_de_standaard.py b/src/calibre/web/feeds/recipes/recipe_de_standaard.py index 2681f2acd9..f247c14d5c 100644 --- a/src/calibre/web/feeds/recipes/recipe_de_standaard.py +++ b/src/calibre/web/feeds/recipes/recipe_de_standaard.py @@ -9,6 +9,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class DeStandaard(BasicNewsRecipe): title = u'De Standaard' __author__ = u'Darko Miletic' + language = _('French') description = u'News from Belgium' oldest_article = 7 max_articles_per_feed = 100 diff --git a/src/calibre/web/feeds/recipes/recipe_discover_magazine.py b/src/calibre/web/feeds/recipes/recipe_discover_magazine.py index 0e3753834b..9c4c4259a5 100644 --- a/src/calibre/web/feeds/recipes/recipe_discover_magazine.py +++ b/src/calibre/web/feeds/recipes/recipe_discover_magazine.py @@ -13,7 +13,8 @@ class DiscoverMagazine(BasicNewsRecipe): title = u'Discover Magazine' description = u'Science, Technology and the Future' __author__ = 'Mike Diaz' - oldest_article = 33 + oldest_article = 33 + language = _('English') max_articles_per_feed = 20 feeds = [ (u'Technology', u'http://discovermagazine.com/topics/technology/rss.xml'), diff --git a/src/calibre/web/feeds/recipes/recipe_economist.py b/src/calibre/web/feeds/recipes/recipe_economist.py index 9ed19802b4..3dfaa7257d 100644 --- a/src/calibre/web/feeds/recipes/recipe_economist.py +++ b/src/calibre/web/feeds/recipes/recipe_economist.py @@ -14,6 +14,7 @@ from urllib2 import quote class Economist(BasicNewsRecipe): title = 'The Economist' + language = _('English') __author__ = "Kovid Goyal" description = 'Global news and current affairs from a European perspective' oldest_article = 7.0 diff --git a/src/calibre/web/feeds/recipes/recipe_el_mercurio_chile.py b/src/calibre/web/feeds/recipes/recipe_el_mercurio_chile.py index 029e29cda5..0b7d994b34 100644 --- a/src/calibre/web/feeds/recipes/recipe_el_mercurio_chile.py +++ b/src/calibre/web/feeds/recipes/recipe_el_mercurio_chile.py @@ -9,6 +9,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class ElMercurio(BasicNewsRecipe): title = 'El Mercurio online' + language = _('Spanish') __author__ = 'Darko Miletic' description = 'El sitio de noticias online de Chile' oldest_article = 2 diff --git a/src/calibre/web/feeds/recipes/recipe_el_pais.py b/src/calibre/web/feeds/recipes/recipe_el_pais.py index f3416ebf6d..a738c517aa 100644 --- a/src/calibre/web/feeds/recipes/recipe_el_pais.py +++ b/src/calibre/web/feeds/recipes/recipe_el_pais.py @@ -11,6 +11,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class ElPais(BasicNewsRecipe): title = u'EL PAIS' + language = _('Spanish') oldest_article = 7 max_articles_per_feed = 100 diff --git a/src/calibre/web/feeds/recipes/recipe_elargentino.py b/src/calibre/web/feeds/recipes/recipe_elargentino.py index 7aee232787..ef79c96baa 100644 --- a/src/calibre/web/feeds/recipes/recipe_elargentino.py +++ b/src/calibre/web/feeds/recipes/recipe_elargentino.py @@ -12,6 +12,7 @@ class ElArgentino(BasicNewsRecipe): title = 'ElArgentino.com' __author__ = 'Darko Miletic' description = 'Informacion Libre las 24 horas' + language = _('Spanish') oldest_article = 2 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_elcronista.py b/src/calibre/web/feeds/recipes/recipe_elcronista.py index f425f99e7a..c875ba45ce 100644 --- a/src/calibre/web/feeds/recipes/recipe_elcronista.py +++ b/src/calibre/web/feeds/recipes/recipe_elcronista.py @@ -13,6 +13,7 @@ class ElCronista(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Noticias de Argentina' oldest_article = 2 + language = _('Spanish') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_elmundo.py b/src/calibre/web/feeds/recipes/recipe_elmundo.py index 4d1ec38c83..9fd6eefb35 100644 --- a/src/calibre/web/feeds/recipes/recipe_elmundo.py +++ b/src/calibre/web/feeds/recipes/recipe_elmundo.py @@ -12,6 +12,7 @@ class ElMundo(BasicNewsRecipe): title = 'El Mundo' __author__ = 'Darko Miletic' description = 'News from Spain' + language = _('Spanish') oldest_article = 2 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_endgadget.py b/src/calibre/web/feeds/recipes/recipe_endgadget.py index 7593d2578e..bcf9fc13f4 100644 --- a/src/calibre/web/feeds/recipes/recipe_endgadget.py +++ b/src/calibre/web/feeds/recipes/recipe_endgadget.py @@ -12,7 +12,8 @@ from calibre.web.feeds.news import BasicNewsRecipe class Engadget(BasicNewsRecipe): title = u'Engadget' __author__ = 'Darko Miletic' - description = 'Tech news' + description = 'Tech news' + language = _('English') oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_espn.py b/src/calibre/web/feeds/recipes/recipe_espn.py index 34a1bc609a..4951d21f9b 100644 --- a/src/calibre/web/feeds/recipes/recipe_espn.py +++ b/src/calibre/web/feeds/recipes/recipe_espn.py @@ -14,6 +14,7 @@ class ESPN(BasicNewsRecipe): title = 'ESPN' description = 'Sports news' __author__ = 'Kovid Goyal' + language = _('English') needs_subscription = True remove_tags = [dict(name='font', attrs={'class':'footer'}), dict(name='hr', noshade='noshade')] diff --git a/src/calibre/web/feeds/recipes/recipe_estadao.py b/src/calibre/web/feeds/recipes/recipe_estadao.py index 554a7e7272..97fcea4b8a 100644 --- a/src/calibre/web/feeds/recipes/recipe_estadao.py +++ b/src/calibre/web/feeds/recipes/recipe_estadao.py @@ -12,7 +12,8 @@ from calibre.web.feeds.news import BasicNewsRecipe class Estadao(BasicNewsRecipe): title = 'O Estado de S. Paulo' __author__ = 'Darko Miletic' - description = 'News from Brasil' + description = 'News from Brasil' + language = _('Spanish') oldest_article = 2 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_faznet.py b/src/calibre/web/feeds/recipes/recipe_faznet.py index 5efe7ec9e6..5e8891ef34 100644 --- a/src/calibre/web/feeds/recipes/recipe_faznet.py +++ b/src/calibre/web/feeds/recipes/recipe_faznet.py @@ -12,7 +12,8 @@ class FazNet(BasicNewsRecipe): title = 'FAZ NET' __author__ = 'Kovid Goyal' description = '"Frankfurter Allgemeine Zeitung' - use_embedded_content = False + use_embedded_content = False + language = _('German') max_articles_per_feed = 30 preprocess_regexps = [ diff --git a/src/calibre/web/feeds/recipes/recipe_financial_times.py b/src/calibre/web/feeds/recipes/recipe_financial_times.py index 5bf21d20fe..fe2956f572 100644 --- a/src/calibre/web/feeds/recipes/recipe_financial_times.py +++ b/src/calibre/web/feeds/recipes/recipe_financial_times.py @@ -13,6 +13,7 @@ class FinancialTimes(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Financial world news' oldest_article = 2 + language = _('English') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_forbes.py b/src/calibre/web/feeds/recipes/recipe_forbes.py index 9fa281fa09..71dd817a5f 100644 --- a/src/calibre/web/feeds/recipes/recipe_forbes.py +++ b/src/calibre/web/feeds/recipes/recipe_forbes.py @@ -7,6 +7,7 @@ class Forbes(BasicNewsRecipe): __author__ = 'Darko Miletic' oldest_article = 30 max_articles_per_feed = 100 + language = _('English') no_stylesheets = True html2lrf_options = ['--base-font-size', '10'] diff --git a/src/calibre/web/feeds/recipes/recipe_freakonomics.py b/src/calibre/web/feeds/recipes/recipe_freakonomics.py index 704f7f727d..8846172e30 100644 --- a/src/calibre/web/feeds/recipes/recipe_freakonomics.py +++ b/src/calibre/web/feeds/recipes/recipe_freakonomics.py @@ -10,6 +10,7 @@ class Freakonomics(BasicNewsRecipe): title = 'Freakonomics Blog' description = 'The Hidden side of everything' __author__ = 'Kovid Goyal' + language = _('English') feeds = [('Blog', 'http://freakonomics.blogs.nytimes.com/feed/atom/')] diff --git a/src/calibre/web/feeds/recipes/recipe_ftd.py b/src/calibre/web/feeds/recipes/recipe_ftd.py index b2c0a8ef50..00c5081bd3 100644 --- a/src/calibre/web/feeds/recipes/recipe_ftd.py +++ b/src/calibre/web/feeds/recipes/recipe_ftd.py @@ -15,6 +15,7 @@ class FTheiseDe(BasicNewsRecipe): __author__ = 'Oliver Niesner' use_embedded_content = False timefmt = ' [%d %b %Y]' + language = _('German') max_articles_per_feed = 40 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_fudzilla.py b/src/calibre/web/feeds/recipes/recipe_fudzilla.py index eda7b6451a..d4c4429d70 100644 --- a/src/calibre/web/feeds/recipes/recipe_fudzilla.py +++ b/src/calibre/web/feeds/recipes/recipe_fudzilla.py @@ -12,6 +12,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class Fudzilla(BasicNewsRecipe): title = u'Fudzilla' __author__ = 'Darko Miletic' + language = _('English') description = 'Tech news' oldest_article = 7 max_articles_per_feed = 100 diff --git a/src/calibre/web/feeds/recipes/recipe_globe_and_mail.py b/src/calibre/web/feeds/recipes/recipe_globe_and_mail.py index a00e12eaaa..c50405096a 100644 --- a/src/calibre/web/feeds/recipes/recipe_globe_and_mail.py +++ b/src/calibre/web/feeds/recipes/recipe_globe_and_mail.py @@ -14,6 +14,7 @@ class GlobeAndMail(BasicNewsRecipe): title = 'Globe and Mail' __author__ = 'Kovid Goyal' + language = _('English') description = 'Canada\'s national newspaper' keep_only_tags = [dict(id='content')] remove_tags = [dict(attrs={'class':'nav'}), dict(id=['related', 'TPphoto', 'secondaryNav', 'articleBottomToolsHolder'])] diff --git a/src/calibre/web/feeds/recipes/recipe_granma.py b/src/calibre/web/feeds/recipes/recipe_granma.py index 977f9cb5fb..43cbd32ae1 100644 --- a/src/calibre/web/feeds/recipes/recipe_granma.py +++ b/src/calibre/web/feeds/recipes/recipe_granma.py @@ -13,6 +13,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class Granma(BasicNewsRecipe): title = 'Diario Granma' __author__ = 'Darko Miletic' + language = _('Spanish') description = 'Organo oficial del Comite Central del Partido Comunista de Cuba' oldest_article = 2 max_articles_per_feed = 100 diff --git a/src/calibre/web/feeds/recipes/recipe_guardian.py b/src/calibre/web/feeds/recipes/recipe_guardian.py index 3fccd7c328..3876df630c 100644 --- a/src/calibre/web/feeds/recipes/recipe_guardian.py +++ b/src/calibre/web/feeds/recipes/recipe_guardian.py @@ -13,6 +13,7 @@ class Guardian(BasicNewsRecipe): title = u'The Guardian' __author__ = 'Seabound' + language = _('English') oldest_article = 7 max_articles_per_feed = 20 diff --git a/src/calibre/web/feeds/recipes/recipe_harpers.py b/src/calibre/web/feeds/recipes/recipe_harpers.py index 7649f6bd9b..e15263730d 100644 --- a/src/calibre/web/feeds/recipes/recipe_harpers.py +++ b/src/calibre/web/feeds/recipes/recipe_harpers.py @@ -10,6 +10,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class Harpers(BasicNewsRecipe): title = u"Harper's Magazine" __author__ = u'Darko Miletic' + language = _('English') description = u"Harper's Magazine: Founded June 1850." oldest_article = 30 max_articles_per_feed = 100 diff --git a/src/calibre/web/feeds/recipes/recipe_harpers_full.py b/src/calibre/web/feeds/recipes/recipe_harpers_full.py index c87faf195a..adf0bf82a3 100644 --- a/src/calibre/web/feeds/recipes/recipe_harpers_full.py +++ b/src/calibre/web/feeds/recipes/recipe_harpers_full.py @@ -15,6 +15,7 @@ class Harpers_full(BasicNewsRecipe): title = u"Harper's Magazine - articles from printed edition" __author__ = u'Darko Miletic' description = u"Harper's Magazine: Founded June 1850." + language = _('English') oldest_article = 30 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_heise.py b/src/calibre/web/feeds/recipes/recipe_heise.py index 9d2f230f6a..7dffa9b092 100644 --- a/src/calibre/web/feeds/recipes/recipe_heise.py +++ b/src/calibre/web/feeds/recipes/recipe_heise.py @@ -13,6 +13,7 @@ class HeiseDe(BasicNewsRecipe): title = 'heise' description = 'Computernews from Germany' __author__ = 'Oliver Niesner' + language = _('German') use_embedded_content = False timefmt = ' [%d %b %Y]' max_articles_per_feed = 40 diff --git a/src/calibre/web/feeds/recipes/recipe_iht.py b/src/calibre/web/feeds/recipes/recipe_iht.py index 4b962f523a..c30be70dea 100644 --- a/src/calibre/web/feeds/recipes/recipe_iht.py +++ b/src/calibre/web/feeds/recipes/recipe_iht.py @@ -11,6 +11,7 @@ from calibre.ptempfile import PersistentTemporaryFile class InternationalHeraldTribune(BasicNewsRecipe): title = u'The International Herald Tribune' __author__ = 'Derry FitzGerald' + language = _('English') oldest_article = 1 max_articles_per_feed = 10 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_infobae.py b/src/calibre/web/feeds/recipes/recipe_infobae.py index b6975d9a60..5acbcfa763 100644 --- a/src/calibre/web/feeds/recipes/recipe_infobae.py +++ b/src/calibre/web/feeds/recipes/recipe_infobae.py @@ -13,6 +13,7 @@ class Infobae(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Informacion Libre las 24 horas' oldest_article = 2 + language = _('Spanish') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_irish_times.py b/src/calibre/web/feeds/recipes/recipe_irish_times.py index 37defe5a80..089e8d974c 100644 --- a/src/calibre/web/feeds/recipes/recipe_irish_times.py +++ b/src/calibre/web/feeds/recipes/recipe_irish_times.py @@ -9,6 +9,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class IrishTimes(BasicNewsRecipe): title = u'The Irish Times' __author__ = 'Derry FitzGerald' + language = _('English') no_stylesheets = True remove_tags = [dict(name='div', attrs={'class':'footer'})] diff --git a/src/calibre/web/feeds/recipes/recipe_japan_times.py b/src/calibre/web/feeds/recipes/recipe_japan_times.py index 91d3604539..4a8c83a883 100644 --- a/src/calibre/web/feeds/recipes/recipe_japan_times.py +++ b/src/calibre/web/feeds/recipes/recipe_japan_times.py @@ -11,7 +11,8 @@ from calibre.web.feeds.news import BasicNewsRecipe class JapanTimes(BasicNewsRecipe): title = u'The Japan Times' __author__ = 'Darko Miletic' - description = 'News from Japan' + description = 'News from Japan' + language = _('English') oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_jb_online.py b/src/calibre/web/feeds/recipes/recipe_jb_online.py index 55510645d8..c94ab25f05 100644 --- a/src/calibre/web/feeds/recipes/recipe_jb_online.py +++ b/src/calibre/web/feeds/recipes/recipe_jb_online.py @@ -13,6 +13,7 @@ class JBOnline(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'News from Brasil' oldest_article = 2 + language = _('Spanish') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_joelonsoftware.py b/src/calibre/web/feeds/recipes/recipe_joelonsoftware.py index 136dddf367..4f2f018708 100644 --- a/src/calibre/web/feeds/recipes/recipe_joelonsoftware.py +++ b/src/calibre/web/feeds/recipes/recipe_joelonsoftware.py @@ -12,6 +12,7 @@ class Joelonsoftware(BasicNewsRecipe): title = 'Joel on Software' __author__ = 'Darko Miletic' description = 'Painless Software Management' + language = _('English') no_stylesheets = True use_embedded_content = True diff --git a/src/calibre/web/feeds/recipes/recipe_jpost.py b/src/calibre/web/feeds/recipes/recipe_jpost.py index 2ae15262f9..d8a00037d5 100644 --- a/src/calibre/web/feeds/recipes/recipe_jpost.py +++ b/src/calibre/web/feeds/recipes/recipe_jpost.py @@ -5,6 +5,7 @@ class JerusalemPost(BasicNewsRecipe): title = 'Jerusalem Post' description = 'News from Israel and the Middle East' use_embedded_content = False + language = _('English') __author__ = 'Kovid Goyal' max_articles_per_feed = 10 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_juventudrebelde.py b/src/calibre/web/feeds/recipes/recipe_juventudrebelde.py index 44802cc251..5fa9f45e41 100644 --- a/src/calibre/web/feeds/recipes/recipe_juventudrebelde.py +++ b/src/calibre/web/feeds/recipes/recipe_juventudrebelde.py @@ -14,6 +14,7 @@ class Juventudrebelde(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Diario de la Juventud Cubana' oldest_article = 2 + language = _('Spanish') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_juventudrebelde_english.py b/src/calibre/web/feeds/recipes/recipe_juventudrebelde_english.py index 9127ac0b21..e7c1002323 100644 --- a/src/calibre/web/feeds/recipes/recipe_juventudrebelde_english.py +++ b/src/calibre/web/feeds/recipes/recipe_juventudrebelde_english.py @@ -12,7 +12,8 @@ from calibre.web.feeds.news import BasicNewsRecipe class Juventudrebelde_english(BasicNewsRecipe): title = 'Juventud Rebelde in english' __author__ = 'Darko Miletic' - description = 'The newspaper of Cuban Youth' + description = 'The newspaper of Cuban Youth' + language = _('English') oldest_article = 2 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_la_cuarta.py b/src/calibre/web/feeds/recipes/recipe_la_cuarta.py index f0136ffaa9..e5576cd442 100644 --- a/src/calibre/web/feeds/recipes/recipe_la_cuarta.py +++ b/src/calibre/web/feeds/recipes/recipe_la_cuarta.py @@ -13,6 +13,7 @@ class LaCuarta(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'El sitio de noticias online de Chile' oldest_article = 2 + language = _('Spanish') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_la_segunda.py b/src/calibre/web/feeds/recipes/recipe_la_segunda.py index af56d84ed6..7f5415806d 100644 --- a/src/calibre/web/feeds/recipes/recipe_la_segunda.py +++ b/src/calibre/web/feeds/recipes/recipe_la_segunda.py @@ -11,7 +11,8 @@ from calibre.web.feeds.news import BasicNewsRecipe class LaSegunda(BasicNewsRecipe): title = 'La Segunda' __author__ = 'Darko Miletic' - description = 'El sitio de noticias online de Chile' + description = 'El sitio de noticias online de Chile' + language = _('Spanish') oldest_article = 2 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_la_tercera.py b/src/calibre/web/feeds/recipes/recipe_la_tercera.py index f2eceb054d..65b0e630df 100644 --- a/src/calibre/web/feeds/recipes/recipe_la_tercera.py +++ b/src/calibre/web/feeds/recipes/recipe_la_tercera.py @@ -13,6 +13,7 @@ class LaTercera(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'El sitio de noticias online de Chile' oldest_article = 2 + language = _('Spanish') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_lanacion.py b/src/calibre/web/feeds/recipes/recipe_lanacion.py index 58d7672116..6cf2afdc89 100644 --- a/src/calibre/web/feeds/recipes/recipe_lanacion.py +++ b/src/calibre/web/feeds/recipes/recipe_lanacion.py @@ -13,6 +13,7 @@ class Lanacion(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Informacion actualizada las 24 horas, con noticias de Argentina y del mundo - Informate ya!' oldest_article = 2 + language = _('Spanish') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_lanacion_chile.py b/src/calibre/web/feeds/recipes/recipe_lanacion_chile.py index 8480bb9538..81f31f07d8 100644 --- a/src/calibre/web/feeds/recipes/recipe_lanacion_chile.py +++ b/src/calibre/web/feeds/recipes/recipe_lanacion_chile.py @@ -14,6 +14,7 @@ class LaNacionChile(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'El sitio de noticias online de Chile' oldest_article = 2 + language = _('Spanish') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_laprensa.py b/src/calibre/web/feeds/recipes/recipe_laprensa.py index 55bb8778a3..7c2567f8e6 100644 --- a/src/calibre/web/feeds/recipes/recipe_laprensa.py +++ b/src/calibre/web/feeds/recipes/recipe_laprensa.py @@ -14,6 +14,7 @@ class LaPrensa(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Informacion Libre las 24 horas' oldest_article = 7 + language = _('Spanish') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_latimes.py b/src/calibre/web/feeds/recipes/recipe_latimes.py index 71bbc14068..915a0946df 100644 --- a/src/calibre/web/feeds/recipes/recipe_latimes.py +++ b/src/calibre/web/feeds/recipes/recipe_latimes.py @@ -14,6 +14,7 @@ class LATimes(BasicNewsRecipe): description = u'News from Los Angeles' oldest_article = 7 max_articles_per_feed = 100 + language = _('English') no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_le_monde.py b/src/calibre/web/feeds/recipes/recipe_le_monde.py index d3ba64f18d..b543650200 100644 --- a/src/calibre/web/feeds/recipes/recipe_le_monde.py +++ b/src/calibre/web/feeds/recipes/recipe_le_monde.py @@ -16,6 +16,7 @@ class LeMonde(BasicNewsRecipe): __author__ = 'Mathieu Godlewski ' description = 'Global news in french' oldest_article = 7 + language = _('French') max_articles_per_feed = 20 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_liberation.py b/src/calibre/web/feeds/recipes/recipe_liberation.py index 9f85433d11..9eb1436b38 100644 --- a/src/calibre/web/feeds/recipes/recipe_liberation.py +++ b/src/calibre/web/feeds/recipes/recipe_liberation.py @@ -12,6 +12,7 @@ class Liberation(BasicNewsRecipe): title = u'Liberation' __author__ = 'Darko Miletic' description = 'News from France' + language = _('French') oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_linux_magazine.py b/src/calibre/web/feeds/recipes/recipe_linux_magazine.py index 8b6d6ba81f..1ce96f9d19 100644 --- a/src/calibre/web/feeds/recipes/recipe_linux_magazine.py +++ b/src/calibre/web/feeds/recipes/recipe_linux_magazine.py @@ -12,7 +12,8 @@ from calibre.web.feeds.news import BasicNewsRecipe class LinuxMagazine(BasicNewsRecipe): title = u'Linux Magazine' __author__ = 'Darko Miletic' - description = 'Linux news' + description = 'Linux news' + language = _('English') oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_lrb.py b/src/calibre/web/feeds/recipes/recipe_lrb.py index 459e3580ce..bec6799ffe 100644 --- a/src/calibre/web/feeds/recipes/recipe_lrb.py +++ b/src/calibre/web/feeds/recipes/recipe_lrb.py @@ -14,6 +14,7 @@ class LondonReviewOfBooks(BasicNewsRecipe): description = u'Literary review publishing essay-length book reviews and topical articles on politics, literature, history, philosophy, science and the arts by leading writers and thinkers' oldest_article = 7 max_articles_per_feed = 100 + language = _('English') no_stylesheets = True use_embedded_content = False encoding = 'cp1252' diff --git a/src/calibre/web/feeds/recipes/recipe_moscow_times.py b/src/calibre/web/feeds/recipes/recipe_moscow_times.py index 6c4d249fad..e16d99284f 100644 --- a/src/calibre/web/feeds/recipes/recipe_moscow_times.py +++ b/src/calibre/web/feeds/recipes/recipe_moscow_times.py @@ -11,7 +11,8 @@ from calibre.web.feeds.news import BasicNewsRecipe class Moscowtimes(BasicNewsRecipe): title = u'The Moscow Times' __author__ = 'Darko Miletic' - description = 'News from Russia' + description = 'News from Russia' + language = _('English') oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_nasa.py b/src/calibre/web/feeds/recipes/recipe_nasa.py index 06bf82ca37..174750e972 100644 --- a/src/calibre/web/feeds/recipes/recipe_nasa.py +++ b/src/calibre/web/feeds/recipes/recipe_nasa.py @@ -31,6 +31,7 @@ class NASA(BasicNewsRecipe): title = 'NASA' timefmt = ' [%Y%b%d %H%M]' + language = _('English') description = 'News from NASA' __author__ = 'Scott Wxby & David Chen' no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_new_scientist.py b/src/calibre/web/feeds/recipes/recipe_new_scientist.py index dac7ab84fc..b87883ef6b 100644 --- a/src/calibre/web/feeds/recipes/recipe_new_scientist.py +++ b/src/calibre/web/feeds/recipes/recipe_new_scientist.py @@ -19,6 +19,7 @@ class NewScientist(BasicNewsRecipe): title = u'New Scientist - Online News' __author__ = 'Darko Miletic' description = 'News from Science' + language = _('English') oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_new_york_review_of_books.py b/src/calibre/web/feeds/recipes/recipe_new_york_review_of_books.py index e2bb4e0960..872381b9a1 100644 --- a/src/calibre/web/feeds/recipes/recipe_new_york_review_of_books.py +++ b/src/calibre/web/feeds/recipes/recipe_new_york_review_of_books.py @@ -15,6 +15,7 @@ class NewYorkReviewOfBooks(BasicNewsRecipe): title = u'New York Review of Books' description = u'Book reviews' + language = _('English') __author__ = 'Kovid Goyal' remove_tags_before = {'id':'container'} diff --git a/src/calibre/web/feeds/recipes/recipe_new_yorker.py b/src/calibre/web/feeds/recipes/recipe_new_yorker.py index f8ef5bc8cc..6134ab03bc 100644 --- a/src/calibre/web/feeds/recipes/recipe_new_yorker.py +++ b/src/calibre/web/feeds/recipes/recipe_new_yorker.py @@ -13,6 +13,7 @@ class NewYorker(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Best of the US journalism' oldest_article = 7 + language = _('English') max_articles_per_feed = 100 no_stylesheets = False use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_newsweek.py b/src/calibre/web/feeds/recipes/recipe_newsweek.py index b4de7c5762..43b7065fa5 100644 --- a/src/calibre/web/feeds/recipes/recipe_newsweek.py +++ b/src/calibre/web/feeds/recipes/recipe_newsweek.py @@ -13,6 +13,7 @@ class Newsweek(BasicNewsRecipe): __author__ = 'Kovid Goyal' description = 'Weekly news and current affairs in the US' no_stylesheets = True + language = _('English') extra_css = '#content { font:serif 12pt; }\n.story {font:12pt}\n.HorizontalHeader {font:18pt}\n.deck {font:16pt}' keep_only_tags = [dict(name='div', id='content')] diff --git a/src/calibre/web/feeds/recipes/recipe_nspm.py b/src/calibre/web/feeds/recipes/recipe_nspm.py index b06df23a75..d828636545 100644 --- a/src/calibre/web/feeds/recipes/recipe_nspm.py +++ b/src/calibre/web/feeds/recipes/recipe_nspm.py @@ -14,6 +14,7 @@ class Nspm(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Casopis za politicku teoriju i drustvena istrazivanja' oldest_article = 7 + language = _('Serbian') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_nspm_int.py b/src/calibre/web/feeds/recipes/recipe_nspm_int.py index b474a5e2a9..ef5aae883a 100644 --- a/src/calibre/web/feeds/recipes/recipe_nspm_int.py +++ b/src/calibre/web/feeds/recipes/recipe_nspm_int.py @@ -14,6 +14,7 @@ class Nspm_int(BasicNewsRecipe): description = 'Magazine dedicated to political theory and sociological research' oldest_article = 20 max_articles_per_feed = 100 + language = _('English') no_stylesheets = True use_embedded_content = False INDEX = 'http://www.nspm.rs/?alphabet=l' diff --git a/src/calibre/web/feeds/recipes/recipe_nytimes.py b/src/calibre/web/feeds/recipes/recipe_nytimes.py index 43f0481e61..270bd5d499 100644 --- a/src/calibre/web/feeds/recipes/recipe_nytimes.py +++ b/src/calibre/web/feeds/recipes/recipe_nytimes.py @@ -14,6 +14,7 @@ class NYTimesMobile(BasicNewsRecipe): title = 'The New York Times' __author__ = 'Kovid Goyal' + language = _('English') description = 'Daily news from the New York Times (mobile version)' timefmt = ' [%a, %d %b, %Y]' multithreaded_fetch = True diff --git a/src/calibre/web/feeds/recipes/recipe_nytimes_sub.py b/src/calibre/web/feeds/recipes/recipe_nytimes_sub.py index fc688512b9..4a4286b335 100644 --- a/src/calibre/web/feeds/recipes/recipe_nytimes_sub.py +++ b/src/calibre/web/feeds/recipes/recipe_nytimes_sub.py @@ -14,6 +14,7 @@ class NYTimes(BasicNewsRecipe): title = 'The New York Times (subscription)' __author__ = 'Kovid Goyal' + language = _('English') description = 'Daily news from the New York Times (subscription version)' timefmt = ' [%a, %d %b, %Y]' needs_subscription = True diff --git a/src/calibre/web/feeds/recipes/recipe_o_globo.py b/src/calibre/web/feeds/recipes/recipe_o_globo.py index 3d7c7bd149..1331ea86a3 100644 --- a/src/calibre/web/feeds/recipes/recipe_o_globo.py +++ b/src/calibre/web/feeds/recipes/recipe_o_globo.py @@ -14,6 +14,7 @@ class OGlobo(BasicNewsRecipe): description = 'News from Brasil' oldest_article = 2 max_articles_per_feed = 100 + language = _('Spanish') no_stylesheets = True use_embedded_content = False encoding = 'cp1252' diff --git a/src/calibre/web/feeds/recipes/recipe_outlook_india.py b/src/calibre/web/feeds/recipes/recipe_outlook_india.py index db8ad900ab..e84a53f04c 100644 --- a/src/calibre/web/feeds/recipes/recipe_outlook_india.py +++ b/src/calibre/web/feeds/recipes/recipe_outlook_india.py @@ -14,6 +14,7 @@ class OutlookIndia(BasicNewsRecipe): title = 'Outlook India' __author__ = 'Kovid Goyal' description = 'Weekly news magazine focussed on India.' + language = _('English') recursions = 1 match_regexp = r'full.asp.*&pn=\d+' html2lrf_options = ['--ignore-tables'] diff --git a/src/calibre/web/feeds/recipes/recipe_pagina12.py b/src/calibre/web/feeds/recipes/recipe_pagina12.py index 8b427e8ad1..8428a9a35f 100644 --- a/src/calibre/web/feeds/recipes/recipe_pagina12.py +++ b/src/calibre/web/feeds/recipes/recipe_pagina12.py @@ -12,7 +12,8 @@ from calibre.web.feeds.news import BasicNewsRecipe class Pagina12(BasicNewsRecipe): title = u'Pagina/12' __author__ = 'Darko Miletic' - description = 'Noticias de Argentina y el resto del mundo' + description = 'Noticias de Argentina y el resto del mundo' + language = _('Spanish') oldest_article = 2 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_portfolio.py b/src/calibre/web/feeds/recipes/recipe_portfolio.py index a8cad99d17..83fd665157 100644 --- a/src/calibre/web/feeds/recipes/recipe_portfolio.py +++ b/src/calibre/web/feeds/recipes/recipe_portfolio.py @@ -13,6 +13,7 @@ class Portfolio(BasicNewsRecipe): title = 'Portfolio' __author__ = 'JTravers' description = 'Conde Nast Portfolio: For the businessman.' + language = _('English') use_embedded_content = True timefmt = ' [%a, %b %d, %Y]' html2lrf_options = ['--ignore-tables'] diff --git a/src/calibre/web/feeds/recipes/recipe_reuters.py b/src/calibre/web/feeds/recipes/recipe_reuters.py index 9fe57ceeb4..3a2d4d6de7 100644 --- a/src/calibre/web/feeds/recipes/recipe_reuters.py +++ b/src/calibre/web/feeds/recipes/recipe_reuters.py @@ -9,6 +9,7 @@ class Reuters(BasicNewsRecipe): description = 'Global news' __author__ = 'Kovid Goyal' use_embedded_content = False + language = _('English') max_articles_per_feed = 10 diff --git a/src/calibre/web/feeds/recipes/recipe_san_fran_chronicle.py b/src/calibre/web/feeds/recipes/recipe_san_fran_chronicle.py index 8682b743a4..7d93d7a5db 100644 --- a/src/calibre/web/feeds/recipes/recipe_san_fran_chronicle.py +++ b/src/calibre/web/feeds/recipes/recipe_san_fran_chronicle.py @@ -11,7 +11,8 @@ from calibre.web.feeds.news import BasicNewsRecipe class SanFranciscoChronicle(BasicNewsRecipe): title = u'San Francisco Chronicle' __author__ = u'Darko Miletic' - description = u'San Francisco news' + description = u'San Francisco news' + language = _('English') oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_science_aas.py b/src/calibre/web/feeds/recipes/recipe_science_aas.py index 0ff14afacd..2b0c706a0d 100644 --- a/src/calibre/web/feeds/recipes/recipe_science_aas.py +++ b/src/calibre/web/feeds/recipes/recipe_science_aas.py @@ -10,6 +10,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class ScienceAAS(BasicNewsRecipe): title = u'Science AAAS' __author__ = u'Darko Miletic' + language = _('English') description = u'The best in science news, commentary, and research' oldest_article = 7 max_articles_per_feed = 100 diff --git a/src/calibre/web/feeds/recipes/recipe_science_news.py b/src/calibre/web/feeds/recipes/recipe_science_news.py index 1ec29a69c6..8828ef9b22 100644 --- a/src/calibre/web/feeds/recipes/recipe_science_news.py +++ b/src/calibre/web/feeds/recipes/recipe_science_news.py @@ -12,6 +12,7 @@ class Sciencenews(BasicNewsRecipe): __author__ = u'Darko Miletic' description = u"Science News is an award-winning weekly newsmagazine covering the most important research in all fields of science. Its 16 pages each week are packed with short, accurate articles that appeal to both general readers and scientists. Published since 1922, the magazine now reaches about 150,000 subscribers and more than 1 million readers. These are the latest News Items from Science News." oldest_article = 30 + language = _('English') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_sciencedaily.py b/src/calibre/web/feeds/recipes/recipe_sciencedaily.py index 2b26de79c8..15293a12e3 100644 --- a/src/calibre/web/feeds/recipes/recipe_sciencedaily.py +++ b/src/calibre/web/feeds/recipes/recipe_sciencedaily.py @@ -12,6 +12,7 @@ class ScienceDaily(BasicNewsRecipe): __author__ = u'Darko Miletic' description = u"Breaking science news and articles on global warming, extrasolar planets, stem cells, bird flu, autism, nanotechnology, dinosaurs, evolution -- the latest discoveries in astronomy, anthropology, biology, chemistry, climate & environment, computers, engineering, health & medicine, math, physics, psychology, technology, and more -- from the world's leading universities and research organizations." oldest_article = 7 + language = _('English') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_scientific_american.py b/src/calibre/web/feeds/recipes/recipe_scientific_american.py index 468e799d44..e2bce46f2f 100644 --- a/src/calibre/web/feeds/recipes/recipe_scientific_american.py +++ b/src/calibre/web/feeds/recipes/recipe_scientific_american.py @@ -14,6 +14,7 @@ class ScientificAmerican(BasicNewsRecipe): title = u'Scientific American' description = u'Popular science. Monthly magazine.' __author__ = 'Kovid Goyal' + language = _('English') oldest_article = 30 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_security_watch.py b/src/calibre/web/feeds/recipes/recipe_security_watch.py index 4975628dcc..7b111da208 100644 --- a/src/calibre/web/feeds/recipes/recipe_security_watch.py +++ b/src/calibre/web/feeds/recipes/recipe_security_watch.py @@ -12,6 +12,7 @@ class SecurityWatch(BasicNewsRecipe): filter_regexps = [r'feedads\.googleadservices\.com'] filter_regexps = [r'ad\.doubleclick'] filter_regexps = [r'advert'] + language = _('English') remove_tags = [dict(id='topBannerContainer'), dict(id='topBannerSmall'), diff --git a/src/calibre/web/feeds/recipes/recipe_shacknews.py b/src/calibre/web/feeds/recipes/recipe_shacknews.py index 878384f63b..7006bc8a7f 100644 --- a/src/calibre/web/feeds/recipes/recipe_shacknews.py +++ b/src/calibre/web/feeds/recipes/recipe_shacknews.py @@ -7,6 +7,7 @@ class Shacknews(BasicNewsRecipe): title = u'Shacknews' oldest_article = 7 max_articles_per_feed = 100 + language = _('English') no_stylesheets = True remove_tags = [dict(name='div', attrs={'class': ['nuggets', 'comments']}), dict(name='p', attrs={'class': 'videoembed'})] diff --git a/src/calibre/web/feeds/recipes/recipe_smh.py b/src/calibre/web/feeds/recipes/recipe_smh.py index 444b211084..f330cc9d8a 100644 --- a/src/calibre/web/feeds/recipes/recipe_smh.py +++ b/src/calibre/web/feeds/recipes/recipe_smh.py @@ -16,6 +16,7 @@ class SMH(BasicNewsRecipe): title = 'Sydney Morning Herald' description = 'Business News, World News and Breaking News in Australia' __author__ = 'Kovid Goyal' + language = _('English') def get_browser(self): br = BasicNewsRecipe.get_browser() diff --git a/src/calibre/web/feeds/recipes/recipe_spiegel_int.py b/src/calibre/web/feeds/recipes/recipe_spiegel_int.py index 7ee8a9f258..3326e2b5ca 100644 --- a/src/calibre/web/feeds/recipes/recipe_spiegel_int.py +++ b/src/calibre/web/feeds/recipes/recipe_spiegel_int.py @@ -14,6 +14,7 @@ class Spiegel_int(BasicNewsRecipe): description = "News and POV from Europe's largest newsmagazine" oldest_article = 7 max_articles_per_feed = 100 + language = _('English') no_stylesheets = True use_embedded_content = False cover_url = 'http://www.spiegel.de/static/sys/v8/headlines/spiegelonline.gif' diff --git a/src/calibre/web/feeds/recipes/recipe_spiegelde.py b/src/calibre/web/feeds/recipes/recipe_spiegelde.py index f13c76639a..c45db73972 100644 --- a/src/calibre/web/feeds/recipes/recipe_spiegelde.py +++ b/src/calibre/web/feeds/recipes/recipe_spiegelde.py @@ -16,6 +16,7 @@ class SpeigelOnline(BasicNewsRecipe): description = 'Nachrichten des Magazins Der Spiegel' __author__ = 'Kovid Goyal' use_embedded_content = False + language = _('German') timefmt = ' [ %Y-%m-%d %a]' max_articles_per_feed = 40 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_st_petersburg_times.py b/src/calibre/web/feeds/recipes/recipe_st_petersburg_times.py index 8734136752..7de4efa80e 100644 --- a/src/calibre/web/feeds/recipes/recipe_st_petersburg_times.py +++ b/src/calibre/web/feeds/recipes/recipe_st_petersburg_times.py @@ -17,6 +17,7 @@ class PetersburgTimes(BasicNewsRecipe): max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False + language = _('Russian') INDEX = 'http://www.sptimes.ru' def parse_index(self): diff --git a/src/calibre/web/feeds/recipes/recipe_sueddeutsche.py b/src/calibre/web/feeds/recipes/recipe_sueddeutsche.py index fa97b73c80..028707b61c 100644 --- a/src/calibre/web/feeds/recipes/recipe_sueddeutsche.py +++ b/src/calibre/web/feeds/recipes/recipe_sueddeutsche.py @@ -16,6 +16,7 @@ class Sueddeutsche(BasicNewsRecipe): use_embedded_content = False timefmt = ' [%d %b %Y]' max_articles_per_feed = 40 + language = _('German') no_stylesheets = True encoding = 'latin1' remove_tags_after = [dict(name='div', attrs={'class':'artikelBox navigatorBox'})] diff --git a/src/calibre/web/feeds/recipes/recipe_telegraph_uk.py b/src/calibre/web/feeds/recipes/recipe_telegraph_uk.py index 5bfb1c3580..7ff0815ae1 100644 --- a/src/calibre/web/feeds/recipes/recipe_telegraph_uk.py +++ b/src/calibre/web/feeds/recipes/recipe_telegraph_uk.py @@ -15,6 +15,7 @@ class TelegraphUK(BasicNewsRecipe): oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True + language = _('English') use_embedded_content = False keep_only_tags = [ diff --git a/src/calibre/web/feeds/recipes/recipe_telepolis.py b/src/calibre/web/feeds/recipes/recipe_telepolis.py index b25554431f..41db3f4631 100644 --- a/src/calibre/web/feeds/recipes/recipe_telepolis.py +++ b/src/calibre/web/feeds/recipes/recipe_telepolis.py @@ -14,6 +14,7 @@ class Telepolis(BasicNewsRecipe): description = 'News from Germany in German' oldest_article = 2 max_articles_per_feed = 100 + language = _('German') no_stylesheets = True use_embedded_content = False encoding = 'utf-8' diff --git a/src/calibre/web/feeds/recipes/recipe_teleread.py b/src/calibre/web/feeds/recipes/recipe_teleread.py index 06d66720fd..1bfd38ea85 100644 --- a/src/calibre/web/feeds/recipes/recipe_teleread.py +++ b/src/calibre/web/feeds/recipes/recipe_teleread.py @@ -14,6 +14,7 @@ class Teleread(BasicNewsRecipe): title = 'Teleread Blog' description = 'News & views on e-books, libraries, publishing and related topics' __author__ = 'Kovid Goyal' + language = _('English') feeds = [('Entries', 'http://www.teleread.org/feed/')] diff --git a/src/calibre/web/feeds/recipes/recipe_the_age.py b/src/calibre/web/feeds/recipes/recipe_the_age.py index 8bedc50cd5..dbc7427c1e 100644 --- a/src/calibre/web/feeds/recipes/recipe_the_age.py +++ b/src/calibre/web/feeds/recipes/recipe_the_age.py @@ -16,6 +16,7 @@ class TheAge(BasicNewsRecipe): title = 'The Age' description = 'Business News, World News and Breaking News in Melbourne, Australia' __author__ = 'Matthew Briggs' + language = _('English') def get_browser(self): br = BasicNewsRecipe.get_browser() diff --git a/src/calibre/web/feeds/recipes/recipe_the_nation.py b/src/calibre/web/feeds/recipes/recipe_the_nation.py index ed21415efd..9b2e48e39e 100644 --- a/src/calibre/web/feeds/recipes/recipe_the_nation.py +++ b/src/calibre/web/feeds/recipes/recipe_the_nation.py @@ -14,6 +14,7 @@ class Thenation(BasicNewsRecipe): oldest_article = 120 max_articles_per_feed = 100 no_stylesheets = True + language = _('English') use_embedded_content = False simultaneous_downloads = 1 delay = 1 diff --git a/src/calibre/web/feeds/recipes/recipe_the_oz.py b/src/calibre/web/feeds/recipes/recipe_the_oz.py index b5911b1c67..351c76a1c4 100644 --- a/src/calibre/web/feeds/recipes/recipe_the_oz.py +++ b/src/calibre/web/feeds/recipes/recipe_the_oz.py @@ -13,6 +13,7 @@ class DailyTelegraph(BasicNewsRecipe): title = u'The Australian' __author__ = u'Matthew Briggs' description = u'National broadsheet newspaper from down under - colloquially known as The Oz' + language = _('English') oldest_article = 2 max_articles_per_feed = 10 remove_javascript = True diff --git a/src/calibre/web/feeds/recipes/recipe_the_scotsman.py b/src/calibre/web/feeds/recipes/recipe_the_scotsman.py index 78ddb46fdb..c42bc4aed7 100644 --- a/src/calibre/web/feeds/recipes/recipe_the_scotsman.py +++ b/src/calibre/web/feeds/recipes/recipe_the_scotsman.py @@ -16,6 +16,7 @@ class TheScotsman(BasicNewsRecipe): max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False + language = _('English') simultaneous_downloads = 1 keep_only_tags = [dict(name='div', attrs={'id':'viewarticle'})] diff --git a/src/calibre/web/feeds/recipes/recipe_themarketticker.py b/src/calibre/web/feeds/recipes/recipe_themarketticker.py index 946369c8a9..b6cf752e23 100644 --- a/src/calibre/web/feeds/recipes/recipe_themarketticker.py +++ b/src/calibre/web/feeds/recipes/recipe_themarketticker.py @@ -14,6 +14,7 @@ class Themarketticker(BasicNewsRecipe): description = 'Commentary On The Capital Markets' oldest_article = 7 max_articles_per_feed = 100 + language = _('English') no_stylesheets = True use_embedded_content = True html2lrf_options = [ '--comment' , description diff --git a/src/calibre/web/feeds/recipes/recipe_time_magazine.py b/src/calibre/web/feeds/recipes/recipe_time_magazine.py index 026aa233db..bceac5fd69 100644 --- a/src/calibre/web/feeds/recipes/recipe_time_magazine.py +++ b/src/calibre/web/feeds/recipes/recipe_time_magazine.py @@ -15,6 +15,7 @@ class Time(BasicNewsRecipe): oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True + language = _('English') use_embedded_content = False keep_only_tags = [dict(name='div', attrs={'class':'tout1'})] diff --git a/src/calibre/web/feeds/recipes/recipe_times_online.py b/src/calibre/web/feeds/recipes/recipe_times_online.py index e57b331820..45e9a1e10e 100644 --- a/src/calibre/web/feeds/recipes/recipe_times_online.py +++ b/src/calibre/web/feeds/recipes/recipe_times_online.py @@ -16,6 +16,7 @@ class TimesOnline(BasicNewsRecipe): max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False + language = _('English') simultaneous_downloads = 1 remove_tags_after = dict(name='div', attrs={'class':'bg-666'}) diff --git a/src/calibre/web/feeds/recipes/recipe_tomshardware.py b/src/calibre/web/feeds/recipes/recipe_tomshardware.py index b0b155666f..2e4f5cfb9e 100644 --- a/src/calibre/web/feeds/recipes/recipe_tomshardware.py +++ b/src/calibre/web/feeds/recipes/recipe_tomshardware.py @@ -15,6 +15,7 @@ class Tomshardware(BasicNewsRecipe): description = 'Hardware reviews and News' no_stylesheets = True needs_subscription = True + language = _('English') INDEX = 'http://www.tomshardware.com' LOGIN = 'http://www.tomshardware.com/membres/?r=%2Fus%2F#loginForm' cover_url = 'http://img.bestofmedia.com/img/tomshardware/design/tomshardware.jpg' diff --git a/src/calibre/web/feeds/recipes/recipe_tomshardware_de.py b/src/calibre/web/feeds/recipes/recipe_tomshardware_de.py index 78d820e246..52f1583408 100644 --- a/src/calibre/web/feeds/recipes/recipe_tomshardware_de.py +++ b/src/calibre/web/feeds/recipes/recipe_tomshardware_de.py @@ -6,7 +6,6 @@ Fetch tomshardware. ''' from calibre.web.feeds.news import BasicNewsRecipe -import re class TomsHardwareDe(BasicNewsRecipe): @@ -17,6 +16,7 @@ class TomsHardwareDe(BasicNewsRecipe): use_embedded_content = False timefmt = ' [%d %b %Y]' max_articles_per_feed = 50 + language = _('German') no_stylesheets = True encoding = 'utf-8' diff --git a/src/calibre/web/feeds/recipes/recipe_upi.py b/src/calibre/web/feeds/recipes/recipe_upi.py index d29c34f769..5a96df7b48 100644 --- a/src/calibre/web/feeds/recipes/recipe_upi.py +++ b/src/calibre/web/feeds/recipes/recipe_upi.py @@ -12,7 +12,7 @@ class UnitedPressInternational(BasicNewsRecipe): title = 'United Press International' max_articles_per_feed = 15 html2lrf_options = ['--override-css= "H1 {font-family: Arial; font-weight: bold; color: #000000; size: 10pt;}"'] - + language = _('English') preprocess_regexps = [ (re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in [ diff --git a/src/calibre/web/feeds/recipes/recipe_usatoday.py b/src/calibre/web/feeds/recipes/recipe_usatoday.py index 6712ad2028..dd14cd01b4 100644 --- a/src/calibre/web/feeds/recipes/recipe_usatoday.py +++ b/src/calibre/web/feeds/recipes/recipe_usatoday.py @@ -15,6 +15,7 @@ class USAToday(BasicNewsRecipe): timefmt = ' [%d %b %Y]' max_articles_per_feed = 20 no_stylesheets = True + language = _('English') extra_css = ''' .inside-head { font: x-large bold } .inside-head2 { font: x-large bold } diff --git a/src/calibre/web/feeds/recipes/recipe_utne.py b/src/calibre/web/feeds/recipes/recipe_utne.py index eb22c21315..2eed5a411e 100644 --- a/src/calibre/web/feeds/recipes/recipe_utne.py +++ b/src/calibre/web/feeds/recipes/recipe_utne.py @@ -17,6 +17,7 @@ class Utne(BasicNewsRecipe): max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False + language = _('English') cover_url = 'http://www.utne.com/images/template/logo.gif' diff --git a/src/calibre/web/feeds/recipes/recipe_wash_post.py b/src/calibre/web/feeds/recipes/recipe_wash_post.py index bd4c78e333..58042d0d4a 100644 --- a/src/calibre/web/feeds/recipes/recipe_wash_post.py +++ b/src/calibre/web/feeds/recipes/recipe_wash_post.py @@ -9,6 +9,7 @@ class WashingtonPost(BasicNewsRecipe): __author__ = 'Kovid Goyal' use_embedded_content = False max_articles_per_feed = 20 + language = _('English') preprocess_regexps = [ (re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in diff --git a/src/calibre/web/feeds/recipes/recipe_wired.py b/src/calibre/web/feeds/recipes/recipe_wired.py index 7feb61bd9c..101adca7b0 100644 --- a/src/calibre/web/feeds/recipes/recipe_wired.py +++ b/src/calibre/web/feeds/recipes/recipe_wired.py @@ -12,6 +12,7 @@ class Wired(BasicNewsRecipe): __author__ = 'David Chen DaveChenorg>' description = 'Technology news' timefmt = ' [%Y%b%d %H%M]' + language = _('English') no_stylesheets = True #html2lrf_options = ['--base-font-size', '16'] diff --git a/src/calibre/web/feeds/recipes/recipe_wsj.py b/src/calibre/web/feeds/recipes/recipe_wsj.py index 8499594d02..a2d72abd99 100644 --- a/src/calibre/web/feeds/recipes/recipe_wsj.py +++ b/src/calibre/web/feeds/recipes/recipe_wsj.py @@ -13,6 +13,7 @@ class WallStreetJournal(BasicNewsRecipe): __author__ = 'Kovid Goyal' description = 'News and current affairs.' needs_subscription = True + language = _('English') max_articles_per_feed = 10 timefmt = ' [%a, %b %d, %Y]' no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_xkcd.py b/src/calibre/web/feeds/recipes/recipe_xkcd.py index 35a65ab948..36b776c380 100644 --- a/src/calibre/web/feeds/recipes/recipe_xkcd.py +++ b/src/calibre/web/feeds/recipes/recipe_xkcd.py @@ -12,6 +12,7 @@ class XkcdCom(BasicNewsRecipe): title = 'xkcd' description = 'A webcomic of romance and math humor.' __author__ = 'Martin Pitt' + language = _('English') use_embedded_content = False oldest_article = 60 keep_only_tags = [dict(id='middleContent')] diff --git a/src/calibre/web/feeds/recipes/recipe_zdnet.py b/src/calibre/web/feeds/recipes/recipe_zdnet.py index 6378f55ad8..2297427b50 100644 --- a/src/calibre/web/feeds/recipes/recipe_zdnet.py +++ b/src/calibre/web/feeds/recipes/recipe_zdnet.py @@ -14,6 +14,7 @@ class cdnet(BasicNewsRecipe): title = 'zdnet' description = 'zdnet security' __author__ = 'Oliver Niesner' + language = _('English') use_embedded_content = False timefmt = ' [%d %b %Y]' max_articles_per_feed = 40 diff --git a/src/calibre/web/feeds/recipes/recipe_zeitde.py b/src/calibre/web/feeds/recipes/recipe_zeitde.py index c37a487153..6e0f919d41 100644 --- a/src/calibre/web/feeds/recipes/recipe_zeitde.py +++ b/src/calibre/web/feeds/recipes/recipe_zeitde.py @@ -12,6 +12,7 @@ class ZeitDe(BasicNewsRecipe): title = 'Die Zeit Nachrichten' description = 'Die Zeit - Online Nachrichten' + language = _('German') __author__ = 'Kovid Goyal' use_embedded_content = False timefmt = ' [%d %b %Y]'