diff --git a/resources/images/news/elsevier.png b/resources/images/news/elsevier.png new file mode 100644 index 0000000000..373b39cd7c Binary files /dev/null and b/resources/images/news/elsevier.png differ diff --git a/resources/recipes/elsevier.recipe b/resources/recipes/elsevier.recipe new file mode 100644 index 0000000000..389ce3f74d --- /dev/null +++ b/resources/recipes/elsevier.recipe @@ -0,0 +1,65 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +elsevier.nl +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class Pagina12(BasicNewsRecipe): + title = 'Elsevier.nl' + __author__ = 'Darko Miletic' + description = 'News from Denmark' + publisher = 'elsevier.nl' + category = 'news, politics, Denmark' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'utf-8' + use_embedded_content = False + language = 'nl' + country = 'NL' + remove_empty_feeds = True + masthead_url = 'http://www.elsevier.nl/static/elsevier/stdimg/logo.gif' + extra_css = ' body{font-family: Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em} ' + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + keep_only_tags = dict(attrs={'id':'artikel_container'}) + remove_tags_before = dict(attrs={'id':'breadcrumb_container'}) + remove_tags_after = dict(attrs={'class':'author_link'}) + remove_tags = [ + dict(attrs={'id':'breadcrumb_container'}) + ,dict(name='div',attrs={'class':'pullout_vak'}) + ] + remove_attributes = ['width','height'] + + feeds = [ + (u'Laatste nieuws' , u'http://www.elsevier.nl/web/RSS/Homepage-RSS.htm?output=xml' ) + ,(u'Nederland' , u'http://www.elsevier.nl/web/RSS/Nederland-RSS.htm?output=xml' ) + ,(u'Politiek' , u'http://www.elsevier.nl/web/RSS/Politiek-RSS.htm?output=xml' ) + ,(u'Europese Unie' , u'http://www.elsevier.nl/web/RSS/Europese-Unie-RSS.htm?output=xml' ) + ,(u'Buitenland' , u'http://www.elsevier.nl/web/RSS/Buitenland-RSS.htm?output=xml' ) + ,(u'Economie' , u'http://www.elsevier.nl/web/RSS/Economie-RSS.htm?output=xml' ) + ,(u'Wetenschap' , u'http://www.elsevier.nl/web/RSS/Wetenschap-RSS.htm?output=xml' ) + ,(u'Cultuur & Televisie' , u'http://www.elsevier.nl/web/RSS/Cultuur-Televisie-RSS.htm?output=xml') + ,(u'Society' , u'http://www.elsevier.nl/web/RSS/Society-RSS.htm?output=xml' ) + ,(u'Internet&/Gadgets' , u'http://www.elsevier.nl/web/RSS/Internet-Gadgets-RSS.htm?output=xml' ) + ,(u'Comentaren' , u'http://www.elsevier.nl/web/RSS/Commentaren-RSS.htm?output=xml' ) + ] + + def print_version(self, url): + return url + '?print=true' + + def get_article_url(self, article): + return article.get('guid', None).rpartition('?')[0] + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + return soup diff --git a/src/calibre/manual/faq.rst b/src/calibre/manual/faq.rst index ba186a0c10..c38f4f1d23 100644 --- a/src/calibre/manual/faq.rst +++ b/src/calibre/manual/faq.rst @@ -313,3 +313,9 @@ I want some feature added to |app|. What can I do? You have two choices: 1. Create a patch by hacking on |app| and send it to me for review and inclusion. See `Development `_. 2. `Open a ticket `_ (you have to register and login first) and hopefully I will find the time to implement your feature. + +Can I include |app| on a CD to be distributed with my product/magazine? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +|app| is licensed under the GNU General Public License v3 (an open source license). This means that you are free to redistribute |app| as long as you make the source code available. So if you want to put |app| on a CD with your product, you must also put the |app| source code on the CD. The source code is available for download `here `_. + +