diff --git a/recipes/developpez.recipe b/recipes/developpez.recipe new file mode 100644 index 0000000000..707e702c0a --- /dev/null +++ b/recipes/developpez.recipe @@ -0,0 +1,21 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1301849956(BasicNewsRecipe): + title = u'Developpez.com' + description = u'Toutes les news du site Developpez.com' + publisher = u'Developpez.com' + timefmt = ' [%a, %d %b, %Y]' + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + encoding = 'ISO-8859-1' + language = 'fr' + __author__ = 'louhike' + remove_javascript = True + keep_only_tags = [dict(name='div', attrs={'class':'content'})] + + feeds = [(u'Tous les articles', u'http://www.developpez.com/index/rss')] + + def get_cover_url(self): + return 'http://javascript.developpez.com/template/images/logo.gif' + diff --git a/recipes/hawaii.recipe b/recipes/hawaii.recipe index ae98e46009..64ee69a0db 100644 --- a/recipes/hawaii.recipe +++ b/recipes/hawaii.recipe @@ -2,7 +2,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class AdvancedUserRecipe1282101454(BasicNewsRecipe): title = 'West Hawaii Today' - __author__ = 'Tony Stegall' + __author__ = 'Tony Stegall, fixed by HK' language = 'en' description = 'Westhawaiitoday.com' publisher = 'West Hawaii ' @@ -15,7 +15,14 @@ class AdvancedUserRecipe1282101454(BasicNewsRecipe): masthead_url = 'http://images.townnews.com/westhawaiitoday.com/art/whttoplogo.gif' - - feeds = [ 'http://www.westhawaiitoday.com/rss.xml'] - + feeds = [ + ('http://www.westhawaiitoday.com/taxonomy/term/2/feed'), #Local News + ('http://www.westhawaiitoday.com/taxonomy/term/15/feed'), #Local Sports + ('http://www.westhawaiitoday.com/taxonomy/term/4/feed'), #Local Features + ('http://www.westhawaiitoday.com/taxonomy/term/12/feed'), #Obituaries + ('http://www.westhawaiitoday.com/taxonomy/term/18/feed'), #Letters + ('http://www.westhawaiitoday.com/taxonomy/term/19/feed'), #Editorial + ('http://www.westhawaiitoday.com/taxonomy/term/20/feed'), #columns + ('http://www.westhawaiitoday.com/taxonomy/term/13/feed') #Volcano Update (Sundays) + ] diff --git a/src/calibre/customize/profiles.py b/src/calibre/customize/profiles.py index bebaebced6..346adf4737 100644 --- a/src/calibre/customize/profiles.py +++ b/src/calibre/customize/profiles.py @@ -470,8 +470,8 @@ class KoboReaderOutput(OutputProfile): description = _('This profile is intended for the Kobo Reader.') - screen_size = (540, 718) - comic_screen_size = (540, 718) + screen_size = (536, 710) + comic_screen_size = (536, 710) dpi = 168.451 fbase = 12 fsizes = [7.5, 9, 10, 12, 15.5, 20, 22, 24] diff --git a/src/odf/odf2xhtml.py b/src/odf/odf2xhtml.py index 390d407d16..26da9d9905 100644 --- a/src/odf/odf2xhtml.py +++ b/src/odf/odf2xhtml.py @@ -1386,12 +1386,19 @@ ol, ul { padding-left: 2em; } self.purgedata() def s_text_s(self, tag, attrs): - """ Generate a number of spaces. ODF has an element; HTML uses   - We use   so we can send the output through an XML parser if we desire to + # Changed by Kovid to fix non breaking spaces being prepended to + # element instead of being part of the text flow. + # We don't use an entity for the nbsp as the contents of self.data will + # be escaped on writeout. + """ Generate a number of spaces. We use the non breaking space for + the text:s ODF element. """ - c = attrs.get( (TEXTNS,'c'),"1") - for x in xrange(int(c)): - self.writeout(' ') + try: + c = int(attrs.get((TEXTNS, 'c'), 1)) + except: + c = 0 + if c > 0: + self.data.append(u'\u00a0'*c) def s_text_span(self, tag, attrs): """ The element matches the element in HTML. It is