View Single Post
Old 12-11-2010, 07:02 PM   #2
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 PeterMzizi View Post
I am using 0.7.33
I find that the Dilbert cartoons do not fit the Sony screen in normal (portrait) or landscape orientation.
Try this:
Spoiler:
Code:
__license__   = 'GPL v3'
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
'''
http://www.dilbert.com
'''

from calibre.web.feeds.recipes import BasicNewsRecipe
import re

class DilbertBig(BasicNewsRecipe):
    title                  = 'DilbertBig'
    __author__             = 'Darko Miletic big images added by Starson17'
    description            = 'DilbertBig'
    reverse_article_order = True
    oldest_article         = 15
    max_articles_per_feed  = 100
    no_stylesheets         = True
    use_embedded_content   = True
    encoding               = 'utf-8'
    publisher              = 'UNITED FEATURE SYNDICATE, INC.'
    category               = 'comic'
    language               = 'en'

    conversion_options = {
                             'comments'        : description
                            ,'tags'            : category
                            ,'language'        : language
                            ,'publisher'       : publisher
                         }

    feeds = [(u'Dilbert', u'http://feeds.dilbert.com/DilbertDailyStrip' )]

    def get_article_url(self, article):
        return article.get('feedburner_origlink', None)

    preprocess_regexps = [
        (re.compile('strip\..*\.gif', re.DOTALL|re.IGNORECASE), lambda match: 'strip.zoom.gif')
        ]

    def preprocess_html(self, soup):
       for tag in soup.findAll(name='a'):
           if tag['href'].find('http://feedads') >= 0:
              tag.extract()
       return soup

    extra_css = '''
                    h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
                    h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
                    img {max-width:100%; min-width:100%;}
                    p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
                    body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
		'''

I don't have a Sony, but I prefer this modification of Dilbert. It may have no effect, but I'd be interested in your report.
Starson17 is offline   Reply With Quote