View Single Post
Old 02-16-2009, 07:24 AM   #212
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
This is what you need to add to your recipe:

After remove_javascript=True insert this:

Code:
    html2lrf_options = ['--ignore-tables']    
    html2epub_options = 'linearize_tables = True'
And at the end of your script insert this:

Code:
    def preprocess_html(self, soup):
        for item in soup.findAll(style=True):
            del item['style']
        for item in soup.findAll(align=True):
            del item['align']
        return soup
The first piece of code transforms table tags into paragraphs which is quite important for good epub generation.

The second piece of code removes any style from html and any align tag (this resolving your align problem)
kiklop74 is offline