diff --git a/src/calibre/ebooks/metadata/opf.xml b/src/calibre/ebooks/metadata/opf.xml index c159f1ee81..6cb70c5b1e 100644 --- a/src/calibre/ebooks/metadata/opf.xml +++ b/src/calibre/ebooks/metadata/opf.xml @@ -17,7 +17,7 @@ ${mi.publisher} ${mi.isbn} ${mi.series} - ${mi.series_index} + ${mi.series_index} ${mi.rating} ${tag} diff --git a/src/calibre/ebooks/metadata/opf2.py b/src/calibre/ebooks/metadata/opf2.py index 8078660a28..3f0adaf662 100644 --- a/src/calibre/ebooks/metadata/opf2.py +++ b/src/calibre/ebooks/metadata/opf2.py @@ -411,7 +411,7 @@ class OPF(object): metadata_path = XPath('descendant::*[re:match(name(), "metadata", "i")]') metadata_elem_path = XPath('descendant::*[re:match(name(), $name, "i")]') - series_path = XPath('descendant::*[re:match(name(), "series(?!_)", "i")]') + series_path = XPath('descendant::*[re:match(name(), "series$", "i")]') authors_path = XPath('descendant::*[re:match(name(), "creator", "i") and (@role="aut" or @opf:role="aut")]') bkp_path = XPath('descendant::*[re:match(name(), "contributor", "i") and (@role="bkp" or @opf:role="bkp")]') tags_path = XPath('descendant::*[re:match(name(), "subject", "i")]') diff --git a/src/calibre/gui2/dialogs/config.py b/src/calibre/gui2/dialogs/config.py index a4b4e85267..2f704e91fa 100644 --- a/src/calibre/gui2/dialogs/config.py +++ b/src/calibre/gui2/dialogs/config.py @@ -71,7 +71,7 @@ class ConfigDialog(QDialog, Ui_Dialog): from calibre.translations import language_codes from calibre.startup import get_lang lang = get_lang() - if lang is not None: + if lang is not None and language_codes.has_key(lang): self.language.addItem(language_codes[lang], QVariant(lang)) items = [(l, language_codes[l]) for l in translations.keys() if l != lang] if lang != 'en': diff --git a/src/calibre/gui2/dialogs/epub.py b/src/calibre/gui2/dialogs/epub.py index c044eb0f01..8bd5ef9331 100644 --- a/src/calibre/gui2/dialogs/epub.py +++ b/src/calibre/gui2/dialogs/epub.py @@ -90,7 +90,7 @@ class Config(QDialog, Ui_Dialog): def select_cover(self): files = choose_images(self, 'change cover dialog', - _('Choose cover for ') + unicode(self.gui_title.text())) + _('Choose cover for ') + unicode(self.title.text())) if not files: return _file = files[0] diff --git a/src/calibre/web/feeds/recipes/__init__.py b/src/calibre/web/feeds/recipes/__init__.py index 45f119813b..3dcb7cb09c 100644 --- a/src/calibre/web/feeds/recipes/__init__.py +++ b/src/calibre/web/feeds/recipes/__init__.py @@ -10,6 +10,7 @@ recipes = [ 'wired', 'globe_and_mail', 'smh', 'espn', 'business_week', 'ars_technica', 'upi', 'new_yorker', 'irish_times', 'iht', 'discover_magazine', 'scientific_american', 'new_york_review_of_books', + 'daily_telegraph', ] import re, imp, inspect, time diff --git a/src/calibre/web/feeds/recipes/daily_telegraph.py b/src/calibre/web/feeds/recipes/daily_telegraph.py new file mode 100644 index 0000000000..dfad458276 --- /dev/null +++ b/src/calibre/web/feeds/recipes/daily_telegraph.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +__license__ = 'GPL v3' +__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' +__docformat__ = 'restructuredtext en' + +''' +http://www.news.com.au/dailytelegraph/ +''' +import re +from calibre.web.feeds.news import BasicNewsRecipe + +class DailyTelegraph(BasicNewsRecipe): + title = u'Daily Telegraph' + __author__ = u'AprilHare' + description = u'News from down under' + oldest_article = 2 + max_articles_per_feed = 10 + remove_tags_before = dict(name='div', attrs={'class':'article-title'}) + remove_tags = [dict(attrs={'class':['article-source', 'article-tools']})] + remove_tags_after = dict(attrs={'class':re.compile('share-article')}) + + feeds = [ + (u'Top Stories', u'http://feeds.news.com.au/public/rss/2.0/dtele_top_stories_253.xml'), + (u'National News', u'http://feeds.news.com.au/public/rss/2.0/dtele_national_news_202.xml'), + (u'World News', u'http://feeds.news.com.au/public/rss/2.0/dtele_world_news_204.xml'), + (u'NSW and ACT', u'http://feeds.news.com.au/public/rss/2.0/dtele_nswact_225.xml'), + (u'Arts', u'http://feeds.news.com.au/public/rss/2.0/dtele_art_444.xml'), + (u'Business News', u'http://feeds.news.com.au/public/rss/2.0/dtele_business_226.xml'), + (u'Entertainment News', u'http://feeds.news.com.au/public/rss/2.0/dtele_entertainment_news_201.xml'), + (u'Lifestyle News', u'http://feeds.news.com.au/public/rss/2.0/dtele_lifestyle_227.xml'), + (u'Music', u'http://feeds.news.com.au/public/rss/2.0/dtele_music_441.xml'), + (u'Property Confidential', u'http://feeds.news.com.au/public/rss/2.0/dtele_property_confidential_463.xml'), + (u'Property - Your Space', u'http://feeds.news.com.au/public/rss/2.0/dtele_property_yourspace_462.xml'), + (u'Confidential News', u'http://feeds.news.com.au/public/rss/2.0/dtele_entertainment_confidential_252.xml'), + (u'Confidential Biographies', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_biographies_491.xml'), + (u'Confidential Galleries', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_galleries_483.xml'), + (u'Confidential In-depth', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_indepth_490.xml'), + (u'Confidential ShowBuzz', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_showbuzz_485.xml'), + (u'Sport', u'http://feeds.news.com.au/public/rss/2.0/dtele_sport_203.xml'), + (u'AFL', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_afl_341.xml'), + (u'Cricket', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_cricket_343.xml'), + (u'Horse Racing', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_horseracing_686.xml'), + (u'NRL', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_nrl_345.xml'), + (u'Rugby Union', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_rugby_union_342.xml'), + (u'Soccer', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_soccer_344.xml') + ] \ No newline at end of file