From ee69eb571e8878a41215f504d76dcc1eec6e918b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 3 Aug 2012 21:47:30 +0530 Subject: [PATCH 1/3] MOBI Output: Fix regression that caused non breaking space characters to be replaced by normal space in last release --- src/calibre/ebooks/mobi/writer2/serializer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/mobi/writer2/serializer.py b/src/calibre/ebooks/mobi/writer2/serializer.py index 1e8a204ad5..2b38c1e6a6 100644 --- a/src/calibre/ebooks/mobi/writer2/serializer.py +++ b/src/calibre/ebooks/mobi/writer2/serializer.py @@ -7,11 +7,10 @@ __license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal ' __docformat__ = 'restructuredtext en' -import re +import re, unicodedata from calibre.ebooks.oeb.base import (OEB_DOCS, XHTML, XHTML_NS, XML_NS, namespace, prefixname, urlnormalize) -from calibre.ebooks import normalize from calibre.ebooks.mobi.mobiml import MBP_NS from calibre.ebooks.mobi.utils import is_guide_ref_start @@ -356,7 +355,9 @@ class Serializer(object): text = text.replace(u'\u00AD', '') # Soft-hyphen if quot: text = text.replace('"', '"') - self.buf.write(normalize(text).encode('utf-8')) + if isinstance(text, unicode): + text = unicodedata.normalize('NFC', text) + self.buf.write(text.encode('utf-8')) def fixup_links(self): ''' From 792532c0db66bed93677e3c6d90142ade995fa13 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 3 Aug 2012 21:56:41 +0530 Subject: [PATCH 2/3] Add pocketbook 360 updated firmware strings --- src/calibre/devices/eb600/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/devices/eb600/driver.py b/src/calibre/devices/eb600/driver.py index 4cf9ee5cf9..04501d193a 100644 --- a/src/calibre/devices/eb600/driver.py +++ b/src/calibre/devices/eb600/driver.py @@ -101,7 +101,7 @@ class POCKETBOOK360(EB600): VENDOR_NAME = ['PHILIPS', '__POCKET', 'POCKETBO'] WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['MASS_STORGE', 'BOOK_USB_STORAGE', - 'OK_POCKET_611_61'] + 'OK_POCKET_611_61', 'OK_POCKET_360+61'] OSX_MAIN_MEM = OSX_CARD_A_MEM = 'Philips Mass Storge Media' OSX_MAIN_MEM_VOL_PAT = re.compile(r'/Pocket') From c5c9cac5a07ba002baee2783eaf2937d3c873a03 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 4 Aug 2012 00:06:56 +0530 Subject: [PATCH 3/3] Content server: Fix browsing the News category in the OPDS feeds --- src/calibre/library/server/opds.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/server/opds.py b/src/calibre/library/server/opds.py index 465439751c..b86d0e7a2d 100644 --- a/src/calibre/library/server/opds.py +++ b/src/calibre/library/server/opds.py @@ -561,7 +561,9 @@ class OPDSServer(object): if type_ != 'I': raise cherrypy.HTTPError(404, 'Non id categories not supported') - ids = self.db.get_books_for_category(category, which) + q = category + if q == 'news': q = 'tags' + ids = self.db.get_books_for_category(q, which) sort_by = 'series' if category == 'series' else 'title' return self.get_opds_acquisition_feed(ids, offset, page_url,