Register Guidelines E-Books Search Today's Posts Mark Forums Read

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


Thread Tools Search this Thread
Old 11-22-2012, 11:19 AM   #1
tylau0 began at the beginning.
Posts: 82
Karma: 10
Join Date: Oct 2010
Device: Kindle
New recipe - House News (主場新聞)

Could Kovid or other Calibre developer upload the following recipe to the next Calibre release? Thanks.

__license__   = 'GPL v3'
__copyright__ = '2012, Eddie Lau'
class AdvancedUserRecipeHouseNews(BasicNewsRecipe):
    title          = u'House News \u4e3b\u5834\u65b0\u805e'
    __author__     = 'Eddie Lau'
    publisher      = 'House News'
    oldest_article = 1
    max_articles_per_feed = 100
    auto_cleanup = False
    language = 'zh'
    encoding = 'utf-8'
    description = ''
    category    = 'Chinese, Blogs, Opinion, News, Hong Kong'
    masthead_url = ''
    extra_css = 'img {display: block; margin-left: auto; margin-right: auto; margin-top: 10px; margin-bottom: 10px; max-height:90%;} p[class=date] {font-size:50%;} div[class=author] {font-size:75%;} p[class=caption] {font-size:50%;}'
    feeds          = [(u'Latest', u'')]
    keep_only_tags = [dict(name='h1'),
                      dict(name='div', attrs={'class':['photo']}),
                      dict(name='p', attrs={'class':'caption'}),
                      dict(name='div', attrs={'class':'articleTextWrap'}),
                      dict(name='div', attrs={'class':['author']}),
                      dict(name='p', attrs={'class':'date'})]

    def populate_article_metadata(self, article, soup, first):
        if first and hasattr(self, 'add_toc_thumbnail'):
            picdiv = soup.find('img')
            if picdiv is not None:
tylau0 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fairbanks Daily News-miner News Recipe Submission rogerx Recipes 2 08-25-2011 08:30 PM
New Fairbanks Daily News-miner News Recipe -- Need Date inclusion only rogerx Recipes 5 08-24-2011 10:12 AM
Recipe for The World Today (Chatham House) bleavett Recipes 0 02-09-2011 05:11 PM
House Beautiful magazine cites MobileRead as a source for ebook news tracyeo News 3 11-26-2008 12:57 PM
Other Fiction 李寶嘉: 官場現形記 (Traditional Chinese) ericshliao Other Books 0 09-13-2008 02:06 PM

All times are GMT -4. The time now is 02:45 AM. is a privately owned, operated and funded community.