View Single Post
Old 01-28-2011, 10:29 AM   #8
tolyluis
Enthusiast
tolyluis doesn't littertolyluis doesn't litter
 
Posts: 49
Karma: 196
Join Date: Jan 2011
Device: Kindle 3
David Bravo's Blog (v1.0 code tested)

Ehem, ehem.....

Hi all, I've a new revision of this recipe, this time i tested with:

Code:
ebook-convert DavidBravo(es).recipe output_dir --test -vv
No major changes made, only revised and tested

It convert with no errors with this

SOURCE CODE

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

'''
http://www.filmica.com/david_bravo/
'''

class AdvancedUserRecipe1294946868(BasicNewsRecipe):

    title             = u'Blog de David Bravo'
    publisher      = u'Filmica'

    __author__  = 'Luis Hernandez'
    description   = 'spanish blog'
    cover_url     = 'http://www.elpais.es/edigitales/image.php?foto=par/portada/1551.jpg'

    oldest_article = 365
    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':['blog','date','blogbody','comments-head','comments-body']})
                                   ,dict(name='span', attrs={'class':['comments-post']})
                                ]

    remove_tags_before = dict(name='div' , attrs={'id':['bitacoras']})
    remove_tags_after  = dict(name='div' , attrs={'id':['comments-body']})

    extra_css             = ' p{text-align: justify; font-size: 100%} body{ text-align: left; font-family: serif; font-size: 100% } h2{ font-family: sans-serif; font-size:75%; font-weight: 800; text-align: justify } h3{ font-family: sans-serif; font-size:150%; font-weight: 600; text-align: left } img{margin-bottom: 0.4em} '
  


    feeds          = [(u'Blog', u'http://www.filmica.com/david_bravo/index.rdf')]
Enjoy this recipe with this fantastic blog (and the responses) a must-read for spanish readers. Can it go into the next release of Calibre?
tolyluis is offline   Reply With Quote