Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-31-2012, 09:29 AM   #1
MacLake
Junior Member
MacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enough
 
Posts: 7
Karma: 548
Join Date: Dec 2011
Device: Sony PRS-T1
How to get rid of the grey background on news from taz.de?

Hi,

I really prefer to read black on white and not on grey. For some reason the news epub created from taz.de (die tageszeitung) with the Calibre recipe creates a grey background. How come? I took a look into the recipe, but I couldn’t find out any instruction that asks for a grey background. Maybe the author of the recipe didn’t even intend it. After unzipping the epub file I could inspect the generated CSS. There are two background colours defined:

Code:
[…]
.sect1 {
    background-color: #efede4;
    […]
    }
[…]
.calibre6 {
    background-color: #ccc;
    […]
    }
[…]
How can I get rid of the grey background? Ok, I can create a new recipe, actually I did a very basic one that just includes the RSS feed URL and yields a white background. But where in the included recipe is the instruction for a grey background hidden?
MacLake is offline   Reply With Quote
Old 01-31-2012, 11:02 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
no_stylesheets = True

in the recipe.
kovidgoyal is offline   Reply With Quote
Advert
Old 02-02-2012, 06:35 AM   #3
MacLake
Junior Member
MacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enough
 
Posts: 7
Karma: 548
Join Date: Dec 2011
Device: Sony PRS-T1
I had the same idea, but the thing is: There is no extra_css in the recipe included in Calibre (yielding a grey background):

Spoiler:
__license__ = 'GPL v3'
__copyright__ = '2010, Alexander Schremmer <alex@alexanderweb.de>'

from calibre.web.feeds.news import BasicNewsRecipe

class TazRSSRecipe(BasicNewsRecipe):
title = u'Taz.de (die tageszeitung) RSS Feed - German'
__author__ = 'Alexander Schremmer'
language = 'de'
lang = 'de-DE'
oldest_article = 7
max_articles_per_feed = 100
publisher = 'taz Entwicklungs GmbH & Co. Medien KG'

conversion_options = {'publisher': publisher,
'language': lang,
}

feeds = [(u'TAZ main feed', u'http://www.taz.de/rss.xml')]
keep_only_tags = [dict(name='div', attrs={'class': 'sect sect_article'})]
remove_tags_after = dict(name='div', attrs={'class': 'rack'})
remove_tags = [
dict(name=['div'], attrs={'class': 'artikelwerbung'}),
dict(name=['ul'], attrs={'class': 'toolbar'}),]



…and there is no “no_stylesheets = True” in my very basic recipe (yielding a white background):

Spoiler:
class AdvancedUserRecipe1328000860(BasicNewsRecipe):
title = u'taz.de'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True

cover_url = 'http://www.taz.de/fileadmin/templates/neu/images/logo_verlagsseiten.gif'
#feeds = [(u'taz.de', u'http://taz.de/!p3270;rss/')]
feeds = [(u'TAZ main feed', u'http://www.taz.de/rss.xml')]


…and the articles on the Taz website viewed in a normal browser don’t have a grey background at all.

In addition, when I add “no_stylesheets = True” in the recipe included in Calibre, the background in the articles is still grey. So there must be something going wrong with the some of the instructions. Very strange!
MacLake is offline   Reply With Quote
Old 02-02-2012, 06:42 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
background colors can be specified in many way, via a style attribute or a bgcolor attribute. You will need to look at the html and figure out what is causing it, and remove it.
kovidgoyal is offline   Reply With Quote
Old 02-02-2012, 06:45 AM   #5
MacLake
Junior Member
MacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enoughMacLake will become famous soon enough
 
Posts: 7
Karma: 548
Join Date: Dec 2011
Device: Sony PRS-T1
The forum software mentions “similar topics” below, and one of it describes about the same problem that I have:

https://www.mobileread.com/forums/sho...d.php?t=112958
MacLake is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Western Grey, Zane: Grey A Collection Vol II of II/ V2. Dec 24 2014 crich70 ePub Books 0 04-08-2011 11:24 AM
adjust background in news feed? shootist Calibre 0 12-25-2010 01:36 PM
Comic Conversion - Grey Background \Fantasy Calibre 2 10-13-2010 04:31 PM
grey background? whopper Calibre 3 08-24-2010 07:08 PM
Pdf background darker than LRF/RTF background LOL2005 Sony Reader 2 10-23-2007 11:00 AM


All times are GMT -4. The time now is 10:35 PM.


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