Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 01-27-2011, 11:57 AM   #1
tolyluis
Enthusiast
tolyluis doesn't littertolyluis doesn't litter
 
Posts: 49
Karma: 196
Join Date: Jan 2011
Device: Kindle 3
La Nueva España (v1.0) - Spanish

Hi everybody:

Last night I've made a new recipe for a spanish local newspaper from Asturias, this newspaper is the most readed in this spanish region, is interesting for local news about Asturias.

RELEASE NOTES

First time using extra_css in recipes, I've just copied the code from El Pais made by Jordi Balcells and adapted to this recipe. I've tried to respect the original newspaper format.

Some feeds are not included because nowadays don't work (the F-1 feed i.e.), may be revised in a future.

Sorry, no images in this ebook, the webcode is simply chaotic, the images are no very good and the generated ebook don't show properly multimedia content, I've prefer remove this content for a sharper and clearer result.

SOURCE CODE

La Nueva España - Local Newspaper from Asturias

Code:
__license__   = 'GPL v3'
__author__    = 'Luis Hernandez'
__copyright__ = 'Luis Hernandez<tolyluis@gmail.com>'
description   = 'Diario independiente de Asturias - v1.0 - 27 Jan 2011'

'''
www.lne.es
'''

class AdvancedUserRecipe1294946868(BasicNewsRecipe):

    title          = u'La Nueva España'
    publisher      = u'Editorial Prensa Iberica'

    __author__            = 'Luis Hernandez'
    description           = 'Diario independiente de Asturias'
    cover_url     = 'http://estaticos00.lne.es//elementosWeb/mediaweb/images/iconos/logo2.jpg'

    oldest_article = 3
    max_articles_per_feed = 100

    remove_javascript = True
    no_stylesheets        = True
    use_embedded_content  = False

    encoding              = 'ISO-8859-1'
    language              = 'es'
    timefmt        = '[%a, %d %b, %Y]'

    keep_only_tags = [
                                dict(name='div', attrs={'class':['noticia_titular','subtitulo','noticiadd2','noticia_texto']})
                               ,dict(name='div', attrs={'id':['noticia_texto']})
                             ]

    extra_css             = ' p{text-align: justify; font-size: 100%} body{ text-align: left; font-family: serif; font-size: 100% } h1{ font-family: sans-serif; font-size:150%; font-weight: 600; text-align: justify; } h2{ font-family: sans-serif; font-size:120%; font-weight: 500; text-align: justify } '


    remove_tags_before = dict(name='div' , attrs={'class':['contenedor']})
    remove_tags_after = dict(name='div' , attrs={'class':['fin_noticia']})

    remove_tags = [
                             dict(name='div', attrs={'class':['epigrafe','antetitulo','bloqueclear','bloqueclear_video','cuadro_multimedia','cintillo2','editor_documentos','noticiadd','noticiadd3','noticiainterior','fin_noticia']})
                            ,dict(name='div', attrs={'id':['evotos']})
                         ]

    feeds = [
                   (u'Al minuto'            , u'http://www.lne.es/elementosInt/rss/AlMinuto')
                  ,(u'General'              , u'http://www.lne.es/elementosInt/rss/55')
                  ,(u'Nacional'             , u'http://www.lne.es/elementosInt/rss/43')
                  ,(u'Internacional'      , u'http://www.lne.es/elementosInt/rss/44')
                  ,(u'Economia'           , u'http://www.lne.es/elementosInt/rss/45')
                  ,(u'Deportes'            , u'http://www.lne.es/elementosInt/rss/47')
                  ,(u'Campeones'        , u'http://www.lne.es/elementosInt/rss/65')
                  ,(u'Sociedad'            , u'http://www.lne.es/elementosInt/rss/46')
                  ,(u'Sucesos'             , u'http://www.lne.es/elementosInt/rss/48')
                  ,(u'Galeria'               , u'http://www.lne.es/elementosInt/rss/51')
                  ,(u'Cultura'               , u'http://www.lne.es/elementosInt/rss/66')
                  ,(u'Motor'                 , u'http://www.lne.es/elementosInt/rss/62')
                  ,(u'Opinion'              , u'http://www.lne.es/elementosInt/rss/52')
                  ,(u'Asturias'              , u'http://www.lne.es/elementosInt/rss/42')
                  ,(u'Oviedo'               , u'http://www.lne.es/elementosInt/rss/31')
                  ,(u'Gijon'                  , u'http://www.lne.es/elementosInt/rss/35')
                  ,(u'Aviles'                 , u'http://www.lne.es/elementosInt/rss/36')
                  ,(u'Nalon'                 , u'http://www.lne.es/elementosInt/rss/37')
                  ,(u'Cuencas'             , u'http://www.lne.es/elementosInt/rss/38')
                  ,(u'Caudal'               , u'http://www.lne.es/elementosInt/rss/39')
                  ,(u'Oriente'              , u'http://www.lne.es/elementosInt/rss/40')
                  ,(u'Occidente'          , u'http://www.lne.es/elementosInt/rss/41')
                  ,(u'Mar y Campo'     , u'http://www.lne.es/elementosInt/rss/63')
                  ,(u'Ultima'               , u'http://www.lne.es/elementosInt/rss/50')
]
It is a about 1 Mb epub newspaper of pure text, hope you enjoy it!
tolyluis is offline   Reply With Quote
Old 01-28-2011, 01:26 PM   #2
tolyluis
Enthusiast
tolyluis doesn't littertolyluis doesn't litter
 
Posts: 49
Karma: 196
Join Date: Jan 2011
Device: Kindle 3
La nueva España (v1.0 ct)

A little changes is necesary in the code for optimal perfomance in testing mode using command ebook-export, no changes made in the "real" code, just has been erased some non-ascii characters.

SOURCE CODE

Code:
__license__   = 'GPL v3'
__author__    = 'Luis Hernandez'
__copyright__ = 'Luis Hernandez<tolyluis@gmail.com>'

'''
www.lne.es
'''

class AdvancedUserRecipe1294946868(BasicNewsRecipe):

    title          = u'La Nueva Espana'
    publisher      = u'Editorial Prensa Iberica'

    __author__            = 'Luis Hernandez'
    description           = 'Diario independiente de Asturias'
    cover_url     = 'http://estaticos00.lne.es//elementosWeb/mediaweb/images/iconos/logo2.jpg'

    oldest_article = 3
    max_articles_per_feed = 100

    remove_javascript = True
    no_stylesheets        = True
    use_embedded_content  = False

    encoding              = 'ISO-8859-1'
    language              = 'es'
    timefmt        = '[%a, %d %b, %Y]'

    keep_only_tags = [
                                dict(name='div', attrs={'class':['noticia_titular','subtitulo','noticiadd2','noticia_texto']})
                               ,dict(name='div', attrs={'id':['noticia_texto']})
                             ]

    extra_css             = ' p{text-align: justify; font-size: 100%} body{ text-align: left; font-family: serif; font-size: 100% } h1{ font-family: sans-serif; font-size:150%; font-weight: 600; text-align: justify; } h2{ font-family: sans-serif; font-size:120%; font-weight: 500; text-align: justify } '


    remove_tags_before = dict(name='div' , attrs={'class':['contenedor']})
    remove_tags_after = dict(name='div' , attrs={'class':['fin_noticia']})

    remove_tags = [
                             dict(name='div', attrs={'class':['epigrafe','antetitulo','bloqueclear','bloqueclear_video','cuadro_multimedia','cintillo2','editor_documentos','noticiadd','noticiadd3','noticiainterior','fin_noticia']})
                            ,dict(name='div', attrs={'id':['evotos']})
                         ]

    feeds = [
                   (u'Al minuto'            , u'http://www.lne.es/elementosInt/rss/AlMinuto')
                  ,(u'General'              , u'http://www.lne.es/elementosInt/rss/55')
                  ,(u'Nacional'             , u'http://www.lne.es/elementosInt/rss/43')
                  ,(u'Internacional'      , u'http://www.lne.es/elementosInt/rss/44')
                  ,(u'Economia'           , u'http://www.lne.es/elementosInt/rss/45')
                  ,(u'Deportes'            , u'http://www.lne.es/elementosInt/rss/47')
                  ,(u'Campeones'        , u'http://www.lne.es/elementosInt/rss/65')
                  ,(u'Sociedad'            , u'http://www.lne.es/elementosInt/rss/46')
                  ,(u'Sucesos'             , u'http://www.lne.es/elementosInt/rss/48')
                  ,(u'Galeria'               , u'http://www.lne.es/elementosInt/rss/51')
                  ,(u'Cultura'               , u'http://www.lne.es/elementosInt/rss/66')
                  ,(u'Motor'                 , u'http://www.lne.es/elementosInt/rss/62')
                  ,(u'Opinion'              , u'http://www.lne.es/elementosInt/rss/52')
                  ,(u'Asturias'              , u'http://www.lne.es/elementosInt/rss/42')
                  ,(u'Oviedo'               , u'http://www.lne.es/elementosInt/rss/31')
                  ,(u'Gijon'                  , u'http://www.lne.es/elementosInt/rss/35')
                  ,(u'Aviles'                 , u'http://www.lne.es/elementosInt/rss/36')
                  ,(u'Nalon'                 , u'http://www.lne.es/elementosInt/rss/37')
                  ,(u'Cuencas'             , u'http://www.lne.es/elementosInt/rss/38')
                  ,(u'Caudal'               , u'http://www.lne.es/elementosInt/rss/39')
                  ,(u'Oriente'              , u'http://www.lne.es/elementosInt/rss/40')
                  ,(u'Occidente'          , u'http://www.lne.es/elementosInt/rss/41')
                  ,(u'Mar y Campo'     , u'http://www.lne.es/elementosInt/rss/63')
                  ,(u'Ultima'               , u'http://www.lne.es/elementosInt/rss/50')
]
Sorry for duplicating posts.

Last edited by tolyluis; 01-28-2011 at 01:27 PM. Reason: Sorry
tolyluis is offline   Reply With Quote
Old 01-28-2011, 07:37 PM   #3
soymicmic
Junior Member
soymicmic began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: AmazonKindle 3
Puxa!

Gracias
soymicmic is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spanish? OBoyle General Discussions 11 02-10-2011 09:32 PM
Recipe for La Nueva España (v1.0) tolyluis Recipes 0 01-27-2011 10:19 AM
Hola a todos desde España veranoazul1982 Introduce Yourself 6 07-30-2010 11:52 PM
PRS-600 Menu in Spanish miguelfer Sony Reader 10 05-22-2010 02:56 AM
Government España: Constitución Española. (Spanish) v1 9 May 2009 Jellby Kindle Books 0 05-09-2009 02:08 PM


All times are GMT -4. The time now is 05:32 AM.


MobileRead.com is a privately owned, operated and funded community.