diff --git a/resources/images/news/abc_py.png b/resources/images/news/abc_py.png new file mode 100644 index 0000000000..55770af920 Binary files /dev/null and b/resources/images/news/abc_py.png differ diff --git a/resources/images/news/ultimahora.png b/resources/images/news/ultimahora.png new file mode 100644 index 0000000000..e2d85aa1a6 Binary files /dev/null and b/resources/images/news/ultimahora.png differ diff --git a/resources/recipes/abc_py.recipe b/resources/recipes/abc_py.recipe new file mode 100644 index 0000000000..297129d269 --- /dev/null +++ b/resources/recipes/abc_py.recipe @@ -0,0 +1,49 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +abc.com.py +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class ABC_py(BasicNewsRecipe): + title = 'ABC digital' + __author__ = 'Darko Miletic' + description = 'Noticias de Paraguay y el resto del mundo' + publisher = 'ABC' + category = 'news, politics, Paraguay' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'cp1252' + use_embedded_content = False + language = 'es_PY' + remove_empty_feeds = True + publication_type = 'newspaper' + extra_css = ' body{font-family: Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em} ' + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + remove_tags = [dict(name=['form','iframe','embed','object','link','base','table']),dict(attrs={'class':'toolbox'})] + remove_tags_after = dict(attrs={'class':'date'}) + keep_only_tags = [dict(attrs={'class':'zcontent'})] + + + feeds = [ + (u'Ultimo momento' , u'http://www.abc.com.py/ultimo-momento.xml' ) + ,(u'Nacionales' , u'http://www.abc.com.py/nacionales.xml' ) + ,(u'Internacionales' , u'http://www.abc.com.py/internacionales.xml' ) + ,(u'Deportes' , u'http://www.abc.com.py/deportes.xml' ) + ,(u'Espectaculos' , u'http://www.abc.com.py/espectaculos.xml' ) + ,(u'Ciencia y Tecnologia', u'http://www.abc.com.py/ciencia-y-tecnologia.xml') + ] + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + return soup diff --git a/resources/recipes/ultimahora.recipe b/resources/recipes/ultimahora.recipe new file mode 100644 index 0000000000..8057717a02 --- /dev/null +++ b/resources/recipes/ultimahora.recipe @@ -0,0 +1,52 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +ultimahora.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class UltimaHora_py(BasicNewsRecipe): + title = 'Ultima Hora' + __author__ = 'Darko Miletic' + description = 'Noticias de Paraguay y el resto del mundo' + publisher = 'EDITORIAL EL PAIS S.A.' + category = 'news, politics, Paraguay' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'cp1252' + use_embedded_content = False + language = 'es_PY' + remove_empty_feeds = True + publication_type = 'newspaper' + masthead_url = 'http://www.ultimahora.com/imgs/uh-com.gif' + extra_css = ' body{font-family: Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em} .sub_titulo_mediano,.TituloNota{font-family: Georgia,"Times New Roman",Times,serif} .sub_titulo_mediano{font-weight: bold} ' + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + remove_tags = [dict(name=['form','iframe','embed','object','link','base','table'])] + keep_only_tags = [dict(attrs={'id':['nota_titulo','nota_copete','texto']})] + + + feeds = [ + (u'Arte y Espectaculos' , u'http://www.ultimahora.com/adjuntos/rss/UHEspectaculos.xml' ) + ,(u'Ciudad del Este' , u'http://www.ultimahora.com/adjuntos/rss/UHCDE.xml' ) + ,(u'Deportes' , u'http://www.ultimahora.com/adjuntos/rss/UHDeportes.xml' ) + ,(u'Ultimo momento' , u'http://www.ultimahora.com/adjuntos/rss/UltimoMomento.xml' ) + ,(u'Nacionales' , u'http://www.ultimahora.com/adjuntos/rss/uh-rss-nacionales.xml' ) + ,(u'Politica' , u'http://www.ultimahora.com/adjuntos/rss/uh-rss-politica.xml' ) + ,(u'Sucesos' , u'http://www.ultimahora.com/adjuntos/rss/uh-rss-sucesos.xml' ) + ,(u'Economia' , u'http://www.ultimahora.com/adjuntos/rss/uh-rss-economia.xml' ) + ,(u'Ciencia y Tecnologia', u'http://www.ultimahora.com/adjuntos/rss/uh-rss-ciencia.xml' ) + ] + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + return soup diff --git a/src/calibre/utils/localization.py b/src/calibre/utils/localization.py index c487e66139..b34d0cdc7e 100644 --- a/src/calibre/utils/localization.py +++ b/src/calibre/utils/localization.py @@ -106,6 +106,7 @@ _extra_lang_codes = { 'en_SG' : _('English (Singapore)'), 'en_YE' : _('English (Yemen)'), 'en_IE' : _('English (Ireland)'), + 'es_PY' : _('Spanish (Paraguay)'), 'de_AT' : _('German (AT)'), 'nl' : _('Dutch (NL)'), 'nl_BE' : _('Dutch (BE)'),