diff --git a/recipes/heise_online.recipe b/recipes/heise_online.recipe index 338b54782c..4d82570698 100644 --- a/recipes/heise_online.recipe +++ b/recipes/heise_online.recipe @@ -1,11 +1,11 @@ from calibre.web.feeds.news import BasicNewsRecipe -import re - class AdvancedUserRecipe(BasicNewsRecipe): - title = 'heise online' + title = 'Heise-online' description = 'News vom Heise-Verlag' __author__ = 'schuster' + masthead_url = 'http://www.heise.de/icons/ho/heise_online_logo.gif' + publisher = 'Heise Zeitschriften Verlag GmbH & Co. KG' use_embedded_content = False language = 'de' oldest_article = 2 @@ -14,11 +14,10 @@ class AdvancedUserRecipe(BasicNewsRecipe): remove_empty_feeds = True timeout = 5 no_stylesheets = True - encoding = 'utf-8' remove_tags_after = dict(name ='p', attrs={'class':'editor'}) - remove_tags = [{'class':'navi_top_container'}, + remove_tags = [dict(id='navi_top_container'), dict(id='navi_bottom'), dict(id='mitte_rechts'), dict(id='navigation'), @@ -29,27 +28,31 @@ class AdvancedUserRecipe(BasicNewsRecipe): dict(id='seiten_navi'), dict(id='adbottom'), dict(id='sitemap'), - dict(name='a', href=re.compile(r'^/([a-zA-Z]+/)?')), - ] + dict(name='div', attrs={'id':'sitemap'}), + dict(name='ul', attrs={'class':'erste_zeile'}), + dict(name='ul', attrs={'class':'zweite_zeile'}), + dict(name='div', attrs={'class':'navi_top_container'})] feeds = [ ('Newsticker', 'http://www.heise.de/newsticker/heise.rdf'), - ('iX', 'http://www.heise.de/ix/news/news.rdf'), - ('Technology Review', 'http://www.heise.de/tr/news-atom.xml'), - ('mobil', 'http://www.heise.de/mobil/newsticker/heise-atom.xml'), - ('Security', 'http://www.heise.de/security/news/news-atom.xml'), - ('Netze', 'http://www.heise.de/netze/rss/netze-atom.xml'), - ('Open Source', 'http://www.heise.de/open/news/news-atom.xml'), - ('Resale ', 'http://www.heise.de/resale/rss/resale.rdf'), + ('Auto', 'http://www.heise.de/autos/rss/news.rdf'), ('Foto ', 'http://www.heise.de/foto/rss/news-atom.xml'), - ('Autos', 'http://www.heise.de/autos/rss/news.rdf'), - ('Mac & i', 'http://www.heise.de/mac-and-i/news.rdf'), + ('Mac&i', 'http://www.heise.de/mac-and-i/news.rdf'), + ('Mobile ', 'http://www.heise.de/mobil/newsticker/heise-atom.xml'), + ('Netz ', 'http://www.heise.de/netze/rss/netze-atom.xml'), + ('Open ', 'http://www.heise.de/open/news/news-atom.xml'), + ('Resale ', 'http://www.heise.de/resale/rss/resale.rdf'), + ('Security ', 'http://www.heise.de/security/news/news-atom.xml'), + ('C`t', 'http://www.heise.de/ct/rss/artikel-atom.xml'), + ('iX', 'http://www.heise.de/ix/news/news.rdf'), + ('Mach-flott', 'http://www.heise.de/mach-flott/rss/mach-flott-atom.xml'), ('Blog: Babel-Bulletin', 'http://www.heise.de/developer/rss/babel-bulletin/blog.rdf'), ('Blog: Der Dotnet-Doktor', 'http://www.heise.de/developer/rss/dotnet-doktor/blog.rdf'), ('Blog: Bernds Management-Welt', 'http://www.heise.de/developer/rss/bernds-management-welt/blog.rdf'), - ('Blog: The World of IT', 'http://www.heise.de/developer/rss/world-of-it/blog.rdf'), - ('Blog: Kais bewegtes Web', 'http://www.heise.de/developer/rss/kais-bewegtes-web/blog.rdf') - ] + ('Blog: IT conversation', 'http://www.heise.de/developer/rss/world-of-it/blog.rdf'), + ('Blog: Kais bewegtes Web', 'http://www.heise.de/developer/rss/kais-bewegtes-web/blog.rdf')] def print_version(self, url): return url + '?view=print' + + diff --git a/recipes/the_week_magazine_free.recipe b/recipes/the_week_magazine_free.recipe index 6e033eaf82..89d9b128b2 100644 --- a/recipes/the_week_magazine_free.recipe +++ b/recipes/the_week_magazine_free.recipe @@ -5,7 +5,6 @@ www.theweek.com ''' from calibre.web.feeds.news import BasicNewsRecipe -import re class TheWeek(BasicNewsRecipe): title = 'The Week Magazine' @@ -21,23 +20,7 @@ class TheWeek(BasicNewsRecipe): encoding = 'utf-8' use_embedded_content = False language = 'en' - preprocess_regexps = [(re.compile(r'

', re.DOTALL), lambda match: '')] - remove_tags_before = dict(name='h1') - remove_tags_after = dict(name='div', attrs={'class':'articleSubscribe4free'}) - remove_tags = [ - dict(name='div', attrs={'class':['floatLeft','imageCaption','slideshowImageAttribution','postDate','utilities','cartoonInfo','left','middle','col300','articleSubscribe4free',' articleFlyout','articleFlyout floatRight','fourFreeBar']}) - ,dict(name='div', attrs={'id':['cartoonThumbs','rightColumn','header','partners']}) - ,dict(name='ul', attrs={'class':['slideshowNav','hotTopicsList topicList']}) - ] - remove_attributes = ['width','height', 'style', 'font', 'color'] - extra_css = ''' - h1{font-family:Geneva, Arial, Helvetica, sans-serif;color:#154B7A;} - h3{font-size: 14px;color:#999999; font-family:Geneva, Arial, Helvetica, sans-serif;font-weight: bold;} - h2{color:#666666; font-family:Geneva, Arial, Helvetica, sans-serif;font-size:small;} - p {font-family:Arial,Helvetica,sans-serif;} - ''' - filter_regexps = [r'www\.palmcoastdata\.com'] - + auto_cleanup = True feeds = [ (u'News-Opinion', u'http://theweek.com/section/index/news_opinion.rss'), (u'Business', u'http://theweek.com/section/index/business.rss'), diff --git a/resources/jacket/template.xhtml b/resources/jacket/template.xhtml index f76a126309..17d0493a82 100644 --- a/resources/jacket/template.xhtml +++ b/resources/jacket/template.xhtml @@ -40,8 +40,7 @@ In addition you can add code to show the values of custom columns here. The value is available as _column_name and the title as _column_name_label. For example, if you have a custom column with label #genre, you can add it to - this template with: -
{_genre_label}: {_genre}
+ this template with _genre_label and _genre. Note that the # is replaced by an underscore. -->
{comments}
diff --git a/src/calibre/devices/kindle/driver.py b/src/calibre/devices/kindle/driver.py index 1770a793ec..35a73f86f0 100644 --- a/src/calibre/devices/kindle/driver.py +++ b/src/calibre/devices/kindle/driver.py @@ -388,13 +388,9 @@ class KINDLE_FIRE(KINDLE2): EBOOK_DIR_MAIN = 'Documents' SUPPORTS_SUB_DIRS = False + SCAN_FROM_ROOT = True + SUPPORTS_SUB_DIRS_FOR_SCAN = True VENDOR_NAME = 'AMAZON' WINDOWS_MAIN_MEM = 'KINDLE' - def get_main_ebook_dir(self, for_upload=False): - if for_upload: - return self.EBOOK_DIR_MAIN - return '' - - diff --git a/src/calibre/devices/nook/driver.py b/src/calibre/devices/nook/driver.py index 2a4cfc6f56..9a328c7498 100644 --- a/src/calibre/devices/nook/driver.py +++ b/src/calibre/devices/nook/driver.py @@ -81,7 +81,7 @@ class NOOK(USBMS): return [x.replace('#', '_') for x in components] class NOOK_COLOR(NOOK): - description = _('Communicate with the Nook Color and TSR eBook readers.') + description = _('Communicate with the Nook Color, TSR and Tablet eBook readers.') PRODUCT_ID = [0x002, 0x003, 0x004] BCD = [0x216] diff --git a/src/calibre/devices/usbms/deviceconfig.py b/src/calibre/devices/usbms/deviceconfig.py index 3f669f1e24..bc7dc116e2 100644 --- a/src/calibre/devices/usbms/deviceconfig.py +++ b/src/calibre/devices/usbms/deviceconfig.py @@ -28,6 +28,8 @@ class DeviceConfig(object): EXTRA_CUSTOMIZATION_DEFAULT = None SUPPORTS_SUB_DIRS = False + SUPPORTS_SUB_DIRS_FOR_SCAN = False # This setting is used when scanning for + # books when SUPPORTS_SUB_DIRS is False MUST_READ_METADATA = False SUPPORTS_USE_AUTHOR_SORT = False diff --git a/src/calibre/devices/usbms/driver.py b/src/calibre/devices/usbms/driver.py index e09876081b..ff2b6f3891 100644 --- a/src/calibre/devices/usbms/driver.py +++ b/src/calibre/devices/usbms/driver.py @@ -202,7 +202,7 @@ class USBMS(CLI, Device): debug_print('USBMS: scan from root', self.SCAN_FROM_ROOT, ebook_dir) if not os.path.exists(ebook_dir): continue # Get all books in the ebook_dir directory - if self.SUPPORTS_SUB_DIRS: + if self.SUPPORTS_SUB_DIRS or self.SUPPORTS_SUB_DIRS_FOR_SCAN: # build a list of files to check, so we can accurately report progress flist = [] for path, dirs, files in os.walk(ebook_dir):