View Single Post
Old 09-22-2010, 12:08 PM   #2807
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by TonytheBookworm View Post
Yeah, sorry about the typo but i tried that and still did not work.
I have noticed that in some cases the author will use a .headline
or simply type h1 or even #div
You may need to remove styles first. Calibre will not strip them unless you tell it to in your recipe
Code:
no_stylesheets        = True
or
    def preprocess_html(self, soup):
        for item in soup.findAll(style=True):
            del item['style']
        return soup
h1 would be all <h1>, h1.bd in the CSS would be <h1 class="bd">, .bd would be all class="bd", etc. Look at the CSS file in your temp directory (after using ebook-convert .....) to see what happened. Open the first index.html in the temp directory, browse down to the articles, and learn to use the CSS explorer in FireBug. I know you use it for spotting the code on the web, but the CSS is useful, too. You can dynamically change the CSS in your local copy of the downloaded articles/recipe by opening it in html form in FireFox with FireBug and using FireBug directly on your downloaded html, instead of on the original article on the web. It's useful in both spots! Play with the CSS and your article changes dynamically.

Quote:
And a side note. Man I have noticed after learning from you. I have been making recipes left and right and all for myself and for others. Never thought I would be doing that but none the less thanks for teaching me.
I noticed. That's great! It's exactly what I hoped would happen. It's more fun to teach to fish than give a fish
I suck at CSS, too, but I get by, and most of what I've learned has come from others who do more format conversions than I do.

Last edited by Starson17; 09-22-2010 at 12:13 PM.
Starson17 is offline