From 283f9b57a797ff68661fb1362c2d114a4ee28f70 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 28 Jun 2011 13:39:54 -0600 Subject: [PATCH 1/2] ... --- src/calibre/db/tables.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/db/tables.py b/src/calibre/db/tables.py index 7240b3ec6e..735d2f69a0 100644 --- a/src/calibre/db/tables.py +++ b/src/calibre/db/tables.py @@ -105,11 +105,13 @@ class ManyToManyTable(ManyToOneTable): class AuthorsTable(ManyToManyTable): def read_id_maps(self, db): + self.alink_map = {} for row in db.conn.execute( - 'SELECT id, name, sort FROM authors'): + 'SELECT id, name, sort, link FROM authors'): self.id_map[row[0]] = row[1] self.extra_map[row[0]] = (row[2] if row[2] else author_to_author_sort(row[1])) + self.alink_map[row[0]] = row[3] class FormatsTable(ManyToManyTable): From f07d04dc332096dcc8ad56873df2aa369e561f82 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 28 Jun 2011 14:51:50 -0600 Subject: [PATCH 2/2] Fix #803147 (Updated recipe for El Universal from Venezuela) --- recipes/eluniversal_ve.recipe | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/recipes/eluniversal_ve.recipe b/recipes/eluniversal_ve.recipe index 28667cd39b..d7c2c4710b 100644 --- a/recipes/eluniversal_ve.recipe +++ b/recipes/eluniversal_ve.recipe @@ -1,5 +1,5 @@ __license__ = 'GPL v3' -__copyright__ = '2010, Darko Miletic ' +__copyright__ = '2010-2011, Darko Miletic ' ''' www.eluniversal.com ''' @@ -15,12 +15,20 @@ class ElUniversal(BasicNewsRecipe): max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False + remove_empty_feeds = True encoding = 'cp1252' publisher = 'El Universal' category = 'news, Caracas, Venezuela, world' language = 'es_VE' + publication_type = 'newspaper' cover_url = strftime('http://static.eluniversal.com/%Y/%m/%d/portada.jpg') - + extra_css = """ + .txt60{font-family: Tahoma,Geneva,sans-serif; font-size: small} + .txt29{font-family: Tahoma,Geneva,sans-serif; font-size: small; color: gray} + .txt38{font-family: Georgia,"Times New Roman",Times,serif; font-size: xx-large} + .txt35{font-family: Georgia,"Times New Roman",Times,serif; font-size: large} + body{font-family: Verdana,Arial,Helvetica,sans-serif} + """ conversion_options = { 'comments' : description ,'tags' : category @@ -28,10 +36,11 @@ class ElUniversal(BasicNewsRecipe): ,'publisher' : publisher } - keep_only_tags = [dict(name='div', attrs={'class':'Nota'})] + remove_tags_before=dict(attrs={'class':'header-print MB10'}) + remove_tags_after= dict(attrs={'id':'SizeText'}) remove_tags = [ - dict(name=['object','link','script','iframe']) - ,dict(name='div',attrs={'class':'Herramientas'}) + dict(name=['object','link','script','iframe','meta']) + ,dict(attrs={'class':'header-print MB10'}) ] feeds = [