diff --git a/Changelog.yaml b/Changelog.yaml index f2920c00f1..5898a4401b 100644 --- a/Changelog.yaml +++ b/Changelog.yaml @@ -19,6 +19,80 @@ # new recipes: # - title: +- version: 0.8.11 + date: 2011-07-22 + + new features: + - title: "When doing a conversion from some format to the same format, save the original file" + description: "When calibre does a conversion from the same format to the same format, for + example, from EPUB to EPUB, the original file is saved as original_epub, so that in case the + conversion is poor, you can change the settings and run it again. The original is automatically used + every time you run a conversion with that format as input. If you want to disable this, + there is a tweak that prevents calibre from saving the originals in Preferences->Tweaks. You can + easily replace the converted version with the original in the Edit metadata dialog by right + clicking on the list of formats in the top right corner." + type: major + + - title: "Conversion pipeline: Add an option to control the height of the blank lines inserted by calibre" + + - title: "Drivers for bq DaVinci, Samsung Galaxy ACE GT-S5830 and Medion e-reader" + + - title: "Get Books: Add stores Chitanka and Bookoteka. Remove epubbuy.de at store's request" + + - title: "Content server: Add a link at the bottom of the mobile interface to switch to the full interface." + tickets: [812525] + + - title: "Update the kindle icon shown when a Kindle is connected to use a picture of the Kindle 3" + tickets: [810852] + + - title: "MOBI Output: When converting epub documents that have a start element in their guide, use it to mark the starting position at which the MOBI file will be opened." + tickets: [804755] + + - title: "News download: Add a default Accept header to all requests" + + bug fixes: + - title: "Fix regression that broke loading translations from .po files in the working directory" + + - title: "Fix conversion dialog not allowing series numbers larger than 9999" + tickets: [813281] + + - title: "Conversion pipeline: When adding/removing entries to the manifest, ignore unparseable URLs instead of erroring out on them" + + - title: "SD Card in Azbooka not being detected" + tickets: [812750] + + - title: "Conversion pipeline: Strip out large blocks of contiguous space (more than 10000 contiguous blanks) as these slow down the conversion process and are almost always indicative of an error in the input document." + + - title: "ebook-convert: Abort if a keyboard interrupt is raised during parsing" + + - title: "Regex builder: Show a nicer error message when the user has the file open in another program on windows." + tickets: [811641] + + - title: "When converting in the GUI, set all identifiers present in the book's metadata in the output file, if the output format supports them." + + improved recipes: + - NBObline + - JBPress + - Instapaper + - Die Zeit + - Wired (UK) + + new recipes: + - title: Utrinski Vesnik + author: Darko Spasovski + + - title: IDG.se + author: zapt0 + + - title: Los Andes + author: Darko Miletic + + - title: De Luns a Venres + author: Susana Sotelo Docío + + - title: "Nikkei News subscription version" + author: Ado Nishimura + - version: 0.8.10 date: 2011-07-15 @@ -669,7 +743,7 @@ - version: 0.8.0 - date: 2010-05-06 + date: 2011-05-06 new features: - title: "Go to http://calibre-ebook.com/new-in/eight to see what's new in 0.8.0" diff --git a/recipes/galicia_confidential.recipe b/recipes/galicia_confidential.recipe index d07946001e..4aaf434b09 100644 --- a/recipes/galicia_confidential.recipe +++ b/recipes/galicia_confidential.recipe @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds import Feed @@ -36,14 +35,13 @@ class GC_gl(BasicNewsRecipe): def feed_to_index_append(self, feedObject, masterFeed): - for feed in feedObject: - newArticles = [] - for article in feed.articles: - newArt = { - 'title' : article.title, - 'url' : article.url, - 'date' : article.date - } - newArticles.append(newArt) - masterFeed.append((feed.title,newArticles)) - + for feed in feedObject: + newArticles = [] + for article in feed.articles: + newArt = { + 'title' : article.title, + 'url' : article.url, + 'date' : article.date + } + newArticles.append(newArt) + masterFeed.append((feed.title,newArticles)) diff --git a/recipes/icons/losandes.png b/recipes/icons/losandes.png new file mode 100644 index 0000000000..635217e727 Binary files /dev/null and b/recipes/icons/losandes.png differ diff --git a/recipes/idg_se.recipe b/recipes/idg_se.recipe new file mode 100644 index 0000000000..b4e86f9643 --- /dev/null +++ b/recipes/idg_se.recipe @@ -0,0 +1,33 @@ +__license__ = 'GPLv3' + +from calibre.web.feeds.news import BasicNewsRecipe + +class IDGse(BasicNewsRecipe): + title = 'IDG' + description = 'IDG.se' + language = 'se' + __author__ = 'zapt0' + oldest_article = 1 + max_articles_per_feed = 40 + no_stylesheets = True + encoding = 'ISO-8859-1' + remove_javascript = True + + feeds = [(u'Senaste nytt',u'http://feeds.idg.se/idg/vzzs')] + + def print_version(self,url): + return url + '?articleRenderMode=print&m=print' + + def get_cover_url(this): + return 'http://idgmedia.idg.se/polopoly_fs/2.3275!images/idgmedia_logo_75.jpg' + + keep_only_tags = [ + dict(name='h1'), + dict(name='div', attrs={'class':['divColumn1Article']}), + ] + #remove ads + remove_tags = [ + dict(name='div', attrs={'id':['preamble_ad']}), + dict(name='ul', attrs={'class':['share']}) + ] + diff --git a/recipes/jbpress.recipe b/recipes/jbpress.recipe index acfb1c78d6..1048f1fc9a 100644 --- a/recipes/jbpress.recipe +++ b/recipes/jbpress.recipe @@ -1,4 +1,4 @@ -import urllib2 +import urllib2, re from calibre.web.feeds.news import BasicNewsRecipe class JBPress(BasicNewsRecipe): @@ -40,3 +40,12 @@ class JBPress(BasicNewsRecipe): def print_version(self, url): url = urllib2.urlopen(url).geturl() # resolve redirect. return url.replace('/-/', '/print/') + + def preprocess_html(self, soup): + # remove breadcrumb + h3s = soup.findAll('h3') + for h3 in h3s: + if re.compile('^JBpress>').match(h3.string): + h3.extract() + return soup + diff --git a/recipes/losandes.recipe b/recipes/losandes.recipe new file mode 100644 index 0000000000..cd095f1b4a --- /dev/null +++ b/recipes/losandes.recipe @@ -0,0 +1,78 @@ +__license__ = 'GPL v3' +__copyright__ = '2011, Darko Miletic ' +''' +www.losandes.com.ar +''' + +from calibre import strftime +from calibre.web.feeds.news import BasicNewsRecipe + +class LosAndes(BasicNewsRecipe): + title = 'Los Andes' + __author__ = 'Darko Miletic' + description = 'Noticias de Mendoza, Argentina y el resto del mundo' + publisher = 'Los Andes' + category = 'news, politics, Argentina' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'cp1252' + use_embedded_content = False + language = 'es_AR' + remove_empty_feeds = True + publication_type = 'newspaper' + masthead_url = 'http://www.losandes.com.ar/graficos/losandes.png' + extra_css = """ + body{font-family: Arial,Helvetica,sans-serif } + h1,h2{font-family: "Times New Roman",Times,serif} + .fechaNota{font-weight: bold; color: gray} + """ + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + remove_tags = [ + dict(name=['meta','link']) + ,dict(attrs={'class':['cabecera', 'url']}) + ] + remove_tags_before=dict(attrs={'class':'cabecera'}) + remove_tags_after=dict(attrs={'class':'url'}) + + + feeds = [ + (u'Ultimas Noticias' , u'http://www.losandes.com.ar/servicios/rss.asp?r=78' ) + ,(u'Politica' , u'http://www.losandes.com.ar/servicios/rss.asp?r=68' ) + ,(u'Economia nacional' , u'http://www.losandes.com.ar/servicios/rss.asp?r=65' ) + ,(u'Economia internacional' , u'http://www.losandes.com.ar/servicios/rss.asp?r=505') + ,(u'Internacionales' , u'http://www.losandes.com.ar/servicios/rss.asp?r=66' ) + ,(u'Turismo' , u'http://www.losandes.com.ar/servicios/rss.asp?r=502') + ,(u'Fincas' , u'http://www.losandes.com.ar/servicios/rss.asp?r=504') + ,(u'Isha nos habla' , u'http://www.losandes.com.ar/servicios/rss.asp?r=562') + ,(u'Estilo' , u'http://www.losandes.com.ar/servicios/rss.asp?r=81' ) + ,(u'Cultura' , u'http://www.losandes.com.ar/servicios/rss.asp?r=503') + ,(u'Policiales' , u'http://www.losandes.com.ar/servicios/rss.asp?r=70' ) + ,(u'Deportes' , u'http://www.losandes.com.ar/servicios/rss.asp?r=69' ) + ,(u'Sociedad' , u'http://www.losandes.com.ar/servicios/rss.asp?r=67' ) + ,(u'Opinion' , u'http://www.losandes.com.ar/servicios/rss.asp?r=80' ) + ,(u'Editorial' , u'http://www.losandes.com.ar/servicios/rss.asp?r=76' ) + ,(u'Mirador' , u'http://www.losandes.com.ar/servicios/rss.asp?r=79' ) + ] + + def print_version(self, url): + artid = url.rpartition('.')[0].rpartition('-')[2] + return "http://www.losandes.com.ar/includes/modulos/imprimir.asp?tipo=noticia&id=" + artid + + def get_cover_url(self): + month = strftime("%m").lstrip('0') + day = strftime("%d").lstrip('0') + year = strftime("%Y") + return "http://www.losandes.com.ar/fotografias/fotosnoticias/" + year + "/" + month + "/" + day + "/th_tapa.jpg" + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + return soup diff --git a/recipes/luns_a_venres.recipe b/recipes/luns_a_venres.recipe new file mode 100644 index 0000000000..1d7a2c159f --- /dev/null +++ b/recipes/luns_a_venres.recipe @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +from calibre.web.feeds.news import BasicNewsRecipe + +class LV_gl(BasicNewsRecipe): + title = u'De Luns a Venres (RSS)' + __author__ = u'Susana Sotelo Docío' + description = u'O gratuíto galego' + publisher = u'Galiciaé' + category = u'news' + encoding = 'utf-8' + language = 'gl' + direction = 'ltr' + cover_url = 'http://lv.galiciae.com/new_estilos/lv/logo.gif' + oldest_article = 2 + max_articles_per_feed = 200 + center_navbar = False + + feeds = [ + (u'Galicia', u'http://lv.galiciae.com/cache/rss/sec_galicia_gl.rss'), + (u'Cultura', u'http://lv.galiciae.com/cache/rss/sec_cultura_gl.rss'), + (u'Mundo', u'http://lv.galiciae.com/cache/rss/sec_mundo_gl.rss'), + (u'Cidadanía', u'http://lv.galiciae.com/cache/rss/sec_ciudadania_gl.rss'), + (u'Tecnoloxía', u'http://lv.galiciae.com/cache/rss/sec_tecnologia_gl.rss'), + (u'España', u'http://lv.galiciae.com/cache/rss/sec_espana_gl.rss'), + (u'Deportes', u'http://lv.galiciae.com/cache/rss/sec_deportes_gl.rss'), + (u'Economía', u'http://lv.galiciae.com/cache/rss/sec_economia_gl.rss'), + (u'Lercheo', u'http://lv.galiciae.com/cache/rss/sec_gente_gl.rss'), + (u'Medio ambiente', u'http://lv.galiciae.com/cache/rss/sec_medioambiente_gl.rss'), + (u'España/Mundo', u'http://lv.galiciae.com/cache/rss/sec_espanamundo_gl.rss'), + (u'Sociedade', u'http://lv.galiciae.com/cache/rss/sec_sociedad_gl.rss'), + (u'Ciencia', u'http://lv.galiciae.com/cache/rss/sec_ciencia_gl.rss'), + (u'Motor', u'http://lv.galiciae.com/cache/rss/sec_motor_gl.rss'), + (u'Coches', u'http://lv.galiciae.com/cache/rss/sec_coches_gl.rss'), + (u'Motos', u'http://lv.galiciae.com/cache/rss/sec_motos_gl.rss'), + (u'Industriais', u'http://lv.galiciae.com/cache/rss/sec_industriales_gl.rss') + ] + + extra_css = u' p{text-align:left} ' + html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\nencoding="' + encoding + '"\ntags="' + category + '"\noverride_css=" p {text-align:left; text-indent: 0cm} "' + + def print_version(self, url): + url += '?imprimir&lang=gl' + return url + diff --git a/recipes/nbonline.recipe b/recipes/nbonline.recipe index c5a06edec7..82b7667a5c 100644 --- a/recipes/nbonline.recipe +++ b/recipes/nbonline.recipe @@ -1,11 +1,10 @@ -EMAILADDRESS = 'hoge@foobar.co.jp' from calibre.web.feeds.news import BasicNewsRecipe class NBOnline(BasicNewsRecipe): title = u'Nikkei Business Online' language = 'ja' - description = u'Nikkei Business Online New articles. PLEASE NOTE: You need to edit EMAILADDRESS line of this "nbonline.recipe" file to set your e-mail address which is needed when login. (file is in "Calibre2/resources/recipes" directory.)' + description = u'Nikkei Business Online.\u6CE8\uFF1A\u30E6\u30FC\u30B6\u30FC\u540D\u306Bemail\u30A2\u30C9\u30EC\u30B9\u3068\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u30BB\u30DF\u30B3\u30ED\u30F3\u3067\u533A\u5207\u3063\u3066\u5165\u308C\u3066\u304F\u3060\u3055\u3044\u3002\u4F8B\uFF1Aemail@address.jp;username . PLEASE NOTE: You need to put your email address and username into username filed separeted by ; (semi-colon).' __author__ = 'Ado Nishimura' needs_subscription = True oldest_article = 7 @@ -23,8 +22,8 @@ class NBOnline(BasicNewsRecipe): if self.username is not None and self.password is not None: br.open('https://signon.nikkeibp.co.jp/front/login/?ct=p&ts=nbo') br.select_form(name='loginActionForm') - br['email'] = EMAILADDRESS - br['userId'] = self.username + br['email'] = self.username.split(';')[0] + br['userId'] = self.username.split(';')[1] br['password'] = self.password br.submit() return br diff --git a/recipes/united_daily.recipe b/recipes/united_daily.recipe index 1013b3d2b6..25493a43ac 100644 --- a/recipes/united_daily.recipe +++ b/recipes/united_daily.recipe @@ -64,7 +64,7 @@ class UnitedDaily(BasicNewsRecipe): __author__ = 'Eddie Lau' __version__ = '1.1' - language = 'zh-TW' + language = 'zh_TW' publisher = 'United Daily News Group' description = 'United Daily (Taiwan)' category = 'News, Chinese, Taiwan' diff --git a/recipes/utrinski.recipe b/recipes/utrinski.recipe new file mode 100644 index 0000000000..5256695079 --- /dev/null +++ b/recipes/utrinski.recipe @@ -0,0 +1,71 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = '2011, Darko Spasovski ' +''' +utrinski.com.mk +''' + +import re +import datetime +from calibre.web.feeds.news import BasicNewsRecipe + +class UtrinskiVesnik(BasicNewsRecipe): + + __author__ = 'Darko Spasovski' + INDEX = 'http://www.utrinski.com.mk/' + title = 'Utrinski Vesnik' + description = 'Daily Macedonian newspaper' + masthead_url = 'http://www.utrinski.com.mk/images/LogoTop.jpg' + language = 'mk' + remove_javascript = True + publication_type = 'newspaper' + category = 'news, Macedonia' + oldest_article = 2 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + preprocess_regexps = [(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in + [ + ## Remove anything before the start of the article. + (r'', lambda match: ''), + + ## Remove anything after the end of the article. + (r'