diff --git a/resources/recipes/heise.recipe b/resources/recipes/heise.recipe index 4c208792aa..bff7179074 100644 --- a/resources/recipes/heise.recipe +++ b/resources/recipes/heise.recipe @@ -9,17 +9,15 @@ from calibre.web.feeds.news import BasicNewsRecipe class heiseDe(BasicNewsRecipe): - + title = 'heise' description = 'Computernews from Germany' __author__ = 'Oliver Niesner' - language = 'de' - use_embedded_content = False timefmt = ' [%d %b %Y]' max_articles_per_feed = 40 no_stylesheets = True - + remove_tags = [dict(id='navi_top'), dict(id='navi_bottom'), dict(id='logo'), @@ -35,12 +33,10 @@ class heiseDe(BasicNewsRecipe): dict(name='div', attrs={'class':'bcadv ISI_IGNORE'}), dict(name='p', attrs={'class':'news_option'}), dict(name='p', attrs={'class':'news_navi'}), - dict(name='p', attrs={'class':'news_foren'})] - remove_tags_after = [dict(name='p', attrs={'class':'news_foren'})] - - feeds = [ ('heise', 'http://www.heise.de/newsticker/heise.rdf') ] - - - + dict(name='div', attrs={'class':'news_foren'})] + remove_tags_after = [dict(name='div', attrs={'class':'news_foren'})] + + feeds = [ ('heise', 'http://www.heise.de/newsticker/heise.rdf') ] + diff --git a/resources/recipes/new_scientist.recipe b/resources/recipes/new_scientist.recipe index 86d2b31e1e..1727a926ed 100644 --- a/resources/recipes/new_scientist.recipe +++ b/resources/recipes/new_scientist.recipe @@ -1,11 +1,11 @@ -#!/usr/bin/env python __license__ = 'GPL v3' -__copyright__ = '2008-2009, AprilHare, Darko Miletic ' +__copyright__ = '2008-2010, AprilHare, Darko Miletic ' ''' newscientist.com ''' +import re from calibre.web.feeds.news import BasicNewsRecipe class NewScientist(BasicNewsRecipe): @@ -15,12 +15,14 @@ class NewScientist(BasicNewsRecipe): language = 'en' publisher = 'New Scientist' category = 'science news, science articles, science jobs, drugs, cancer, depression, computer software' - delay = 3 oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False + cover_url = 'http://www.newscientist.com/currentcover.jpg' + masthead_url = 'http://www.newscientist.com/img/misc/ns_logo.jpg' encoding = 'utf-8' + extra_css = ' body{font-family: Arial,sans-serif} img{margin-bottom: 0.8em} ' conversion_options = { 'comment' : description @@ -28,14 +30,18 @@ class NewScientist(BasicNewsRecipe): , 'publisher' : publisher , 'language' : language } + preprocess_regexps = [(re.compile(r'.*?', re.DOTALL|re.IGNORECASE),lambda match: '')] - keep_only_tags = [dict(name='div', attrs={'id':['pgtop','maincol']})] + keep_only_tags = [dict(name='div', attrs={'id':['pgtop','maincol','nsblgposts','hldgalcols']})] remove_tags = [ - dict(name='div', attrs={'class':['hldBd','adline','pnl','infotext' ]}) - ,dict(name='div', attrs={'id' :['compnl','artIssueInfo','artTools']}) - ,dict(name='p' , attrs={'class':['marker','infotext' ]}) + dict(name='div' , attrs={'class':['hldBd','adline','pnl','infotext' ]}) + ,dict(name='div' , attrs={'id' :['compnl','artIssueInfo','artTools']}) + ,dict(name='p' , attrs={'class':['marker','infotext' ]}) + ,dict(name='meta' , attrs={'name' :'description' }) ] + remove_tags_after = dict(attrs={'class':'nbpcopy'}) + remove_attributes = ['height','width'] feeds = [ (u'Latest Headlines' , u'http://feeds.newscientist.com/science-news' ) @@ -50,9 +56,15 @@ class NewScientist(BasicNewsRecipe): ] def get_article_url(self, article): - url = article.get('guid', None) - return url + return article.get('guid', None) def print_version(self, url): return url + '?full=true&print=true' + def preprocess_html(self, soup): + for tg in soup.findAll('a'): + if tg.string == 'Home': + tg.parent.extract() + return self.adeify_images(soup) + return self.adeify_images(soup) + diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index 5a3a209f5c..7e0df10595 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -407,7 +407,7 @@ from calibre.devices.blackberry.driver import BLACKBERRY from calibre.devices.cybook.driver import CYBOOK from calibre.devices.eb600.driver import EB600, COOL_ER, SHINEBOOK, \ POCKETBOOK360, GER2, ITALICA, ECLICTO, DBOOK, INVESBOOK, \ - BOOQ + BOOQ, ELONEX from calibre.devices.iliad.driver import ILIAD from calibre.devices.irexdr.driver import IREXDR1000, IREXDR800 from calibre.devices.jetbook.driver import JETBOOK @@ -496,6 +496,7 @@ plugins += [ README, N516, EB511, + ELONEX ] plugins += [x for x in list(locals().values()) if isinstance(x, type) and \ x.__name__.endswith('MetadataReader')] diff --git a/src/calibre/customize/profiles.py b/src/calibre/customize/profiles.py index 1a8e43a233..f260b54fa0 100644 --- a/src/calibre/customize/profiles.py +++ b/src/calibre/customize/profiles.py @@ -235,7 +235,7 @@ class SonyReaderOutput(OutputProfile): description = _('This profile is intended for the SONY PRS line. ' 'The 500/505/600/700 etc.') - screen_size = (600, 775) + screen_size = (590, 775) dpi = 168.451 fbase = 12 fsizes = [7.5, 9, 10, 12, 15.5, 20, 22, 24] diff --git a/src/calibre/devices/eb600/driver.py b/src/calibre/devices/eb600/driver.py index 12c4048b5f..dfb1d9f8b0 100644 --- a/src/calibre/devices/eb600/driver.py +++ b/src/calibre/devices/eb600/driver.py @@ -195,3 +195,15 @@ class BOOQ(EB600): WINDOWS_MAIN_MEM = 'EB600' WINDOWS_CARD_A_MEM = 'EB600' +class ELONEX(EB600): + + name = 'Elonex 600EB' + gui_name = 'Elonex' + + FORMATS = ['epub', 'pdf', 'txt', 'html'] + + VENDOR_NAME = 'ELONEX' + WINDOWS_MAIN_MEM = 'EBOOK' + WINDOWS_CARD_A_MEM = 'EBOOK' + + diff --git a/src/calibre/manual/faq.rst b/src/calibre/manual/faq.rst index 1d44c004fd..795386b90e 100644 --- a/src/calibre/manual/faq.rst +++ b/src/calibre/manual/faq.rst @@ -305,7 +305,7 @@ Your antivirus program is wrong. |app| is a completely open source product. You How do I use purchased EPUB books with |app|? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Most purchased EPUB books have `DRM `_. This prevents |app| from opening them. You can still use |app| to store and transfer them to your SONY Reader. First, you must authorize your reader on a windows machine with Adobe Digital Editions. Once this is done, EPUB books transferred with |app| will work fine on your reader. When you purchase an epub book from a website, you will get an ".acsm" file. This file should be opened with Adobe Digital Editions, which will then download the actual ".epub" e-book. The e-book file will be stored in the folder "My Digital Editions", from where you can add it to |app|. +Most purchased EPUB books have `DRM `_. This prevents |app| from opening them. You can still use |app| to store and transfer them to your e-book reader. First, you must authorize your reader on a windows machine with Adobe Digital Editions. Once this is done, EPUB books transferred with |app| will work fine on your reader. When you purchase an epub book from a website, you will get an ".acsm" file. This file should be opened with Adobe Digital Editions, which will then download the actual ".epub" e-book. The e-book file will be stored in the folder "My Digital Editions", from where you can add it to |app|. I want some feature added to |app|. What can I do? diff --git a/src/calibre/manual/gui.rst b/src/calibre/manual/gui.rst index 06906cdfb3..d37b5eda15 100644 --- a/src/calibre/manual/gui.rst +++ b/src/calibre/manual/gui.rst @@ -134,7 +134,7 @@ The :guilabel:`Convert E-books` action has three variations, accessed by the arr 2. **Bulk convert**: This allows you to specify options only once to convert a number of ebooks in bulk. - 3. **Create catalog**: This action allow yous to generate a complete listing with all metadata of the books in your library, in several formats, like XML, CSV, EPUB and MOBI. The catalog will contain all the books showing in the library view currently, so you can use the search features to limit the books to be catalogued. In addition, if you select multiple books using the mouse, only those books will be added to the catalog. If you generate the catalog in an e-book format such as EPUB or MOBI, the next time you connect your e-book reader, the catalog will be automatically sent to the device. + 3. **Create catalog**: This action allows you to generate a complete listing with all metadata of the books in your library, in several formats, like XML, CSV, EPUB and MOBI. The catalog will contain all the books showing in the library view currently, so you can use the search features to limit the books to be catalogued. In addition, if you select multiple books using the mouse, only those books will be added to the catalog. If you generate the catalog in an e-book format such as EPUB or MOBI, the next time you connect your e-book reader, the catalog will be automatically sent to the device. For details on how catalogs work, see `here `_. .. _view: @@ -156,7 +156,7 @@ A *catalog* is a collection of books. |app| can manage three different catalogs: 2. **Reader**: This is a collection of books stored in the main memory of your ebook reader. It will be available when you connect the reader to your computer. - 3. **Card**: This is a collection of books stored on the storage card in your reader. Note that ${app} supports only a single storage card at a time. + 3. **Card**: This is a collection of books stored on the storage card in your reader. .. _search_sort: