New recipe for Windows SuperSite by Hypernova

This commit is contained in:
Kovid Goyal 2009-02-21 18:56:01 -08:00
parent cfcccb0443
commit 6c8d6a4edb
3 changed files with 31 additions and 3 deletions

View File

@ -233,7 +233,7 @@ class RTFMetadataWriter(MetadataWriterPlugin):
class MOBIMetadataWriter(MetadataWriterPlugin):
name = 'Set MOBI metadata'
file_types = set(['mobi', 'prc'])
file_types = set(['mobi', 'prc', 'azw'])
description = _('Set metadata in %s files')%'MOBI'
author = 'Marshall T. Vandegrift'
@ -246,4 +246,4 @@ plugins = [HTML2ZIP]
plugins += [x for x in list(locals().values()) if isinstance(x, type) and \
x.__name__.endswith('MetadataReader')]
plugins += [x for x in list(locals().values()) if isinstance(x, type) and \
x.__name__.endswith('MetadataWriter')]
x.__name__.endswith('MetadataWriter')]

View File

@ -31,7 +31,7 @@ recipe_modules = ['recipe_' + r for r in (
'pobjeda', 'chicago_breaking_news', 'glasgow_herald', 'linuxdevices',
'hindu', 'cincinnati_enquirer', 'physics_world', 'pressonline',
'la_republica', 'physics_today', 'chicago_tribune', 'e_novine',
'al_jazeera',
'al_jazeera', 'winsupersite',
)]
import re, imp, inspect, time, os

View File

@ -0,0 +1,28 @@
import re
from calibre.web.feeds.news import BasicNewsRecipe
class Winsupersite(BasicNewsRecipe):
title = u'Supersite for Windows'
description = u'Paul Thurrott SuperSite for Windows'
publisher = 'Paul Thurrott'
__author__ = 'Hypernova'
language = _('English')
oldest_article = 30
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
remove_javascript = True
html2lrf_options = ['--ignore-tables']
html2epub_options = 'linearize_tables = True'
remove_tags_before = dict(name='h1')
preprocess_regexps = [
(re.compile(r'<p>--Paul Thurrott.*</body>', re.DOTALL|re.IGNORECASE),
lambda match: '</body>'),
]
def get_browser(self):
br = BasicNewsRecipe.get_browser()
br.open('http://www.winsupersite.com')
return br
feeds = [(u'Supersite for Windows', u'http://www.winsupersite.com/supersite.xml')]