|
|
#1 |
|
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Dec 2010
Device: Graphite Kindle DX
|
extra_css not working with embedded content?
Calibre 0.8.41, targeting a graphite Kindle DX (but mostly working with ebook-viewer).
I'm working on a recipe to pull the Atom feeds of commits from GitHub, which should be pretty simple: Code:
class GitHubCommits(BasicNewsRecipe):
title = u'GitHub Commits'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
use_embedded_content = True
extra_css = 'pre,code,samp,kbd,tt { font-size: 80% }\nblockquote {margin-left:0 }\n* { color: black }'
feeds = [(u'Puppet', u'https://github.com/puppetlabs/puppet/commits/master.atom')]
One of the first things I tried was to increase the contrast, to ensure that I am really not seeing the effect I expect, so I tried the font-size as both 50% and 200%. The results in E-book Viewer were surprising--instead of the fixed-width font decreasing or increasing in size, it stays the same but the font of the text in the feed's <title> is scaled up or down, respectively. Noticing that the feed has style added to parts of the <pre>, I have tried adding the following too: Code:
remove_attributes = ['style', 'font'] Code:
class AdvancedUserRecipe1321465899(BasicNewsRecipe):
title = u'Puppet'
oldest_article = 14
max_articles_per_feed = 100
auto_cleanup = True
extra_css = u'pre,code,samp,kbd,tt { font-size: 50% }\nblockquote {margin-left:0 }\n* { color: black !important }'
use_embedded_content = True
feeds = [(u'Planet Puppet', u'http://feeds.feedburner.com/planetpuppet?format=xml')]
Any hints about where I'm going wrong? |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It definitely applies for embedded content as well, in fact it is applied in the same function as the navbar (see _postprocess_html() in feeds/news.py).
|
|
|
|
| Advert | |
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Content Server url prefix not working | Caleb666 | Calibre | 3 | 09-04-2011 12:43 PM |
| Help with extra_css | DTM | Recipes | 2 | 02-16-2011 09:55 PM |
| Classic Check for new B&N content not working | graddy | Barnes & Noble NOOK | 1 | 07-18-2010 10:40 PM |
| extra_css - need remedial help | BrianG | Calibre | 3 | 01-21-2010 02:52 PM |
| PRS-500 Embedded fonts in LRF WORKING | igorsk | Sony Reader Dev Corner | 21 | 03-23-2007 06:59 AM |