diff --git a/manual/develop.rst b/manual/develop.rst index b9fba195d3..719c876b33 100644 --- a/manual/develop.rst +++ b/manual/develop.rst @@ -49,7 +49,7 @@ All the |app| python code is in the ``calibre`` package. This package contains t * Metadata reading, writing, and downloading is all in ebooks.metadata * Conversion happens in a pipeline, for the structure of the pipeline, see :ref:`conversion-introduction`. The pipeline consists of an input - plugin, various transforms and an output plugin. The code constructs + plugin, various transforms and an output plugin. The that code constructs and drives the pipeline is in plumber.py. The pipeline works on a representation of an ebook that is like an unzipped epub, with manifest, spine, toc, guide, html content, etc. The @@ -74,10 +74,6 @@ After installing Bazaar, you can get the |app| source code with the command:: On Windows you will need the complete path name, that will be something like :file:`C:\\Program Files\\Bazaar\\bzr.exe`. -To update a branch to the latest code, use the command:: - - bzr merge - |app| is a very large project with a very long source control history, so the above can take a while (10mins to an hour depending on your internet speed). @@ -88,6 +84,11 @@ using:: bzr branch --stacked lp:calibre + +To update a branch to the latest code, use the command:: + + bzr merge + Submitting your changes to be included ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/recipes/hindu.recipe b/recipes/hindu.recipe index cc5305eb77..eb84fc4031 100644 --- a/recipes/hindu.recipe +++ b/recipes/hindu.recipe @@ -16,10 +16,14 @@ class TheHindu(BasicNewsRecipe): keep_only_tags = [dict(id='content')] remove_tags = [dict(attrs={'class':['article-links', 'breadcr']}), - dict(id=['email-section', 'right-column', 'printfooter'])] + dict(id=['email-section', 'right-column', 'printfooter', 'topover', + 'slidebox', 'th_footer'])] extra_css = '.photo-caption { font-size: smaller }' + def preprocess_raw_html(self, raw, url): + return raw.replace('
', '
').replace('
', '') + def postprocess_html(self, soup, first_fetch): for t in soup.findAll(['table', 'tr', 'td','center']): t.name = 'div' diff --git a/recipes/nikkei_news.recipe b/recipes/nikkei_news.recipe index aa351e0a0d..3260b8c168 100644 --- a/recipes/nikkei_news.recipe +++ b/recipes/nikkei_news.recipe @@ -13,8 +13,11 @@ class NikkeiNet_paper_subscription(BasicNewsRecipe): max_articles_per_feed = 30 language = 'ja' no_stylesheets = True - cover_url = 'http://parts.nikkei.com/parts/ds/images/common/logo_r1.svg' - masthead_url = 'http://parts.nikkei.com/parts/ds/images/common/logo_r1.svg' + #cover_url = 'http://parts.nikkei.com/parts/ds/images/common/logo_r1.svg' + cover_url = 'http://cdn.nikkei.co.jp/parts/ds/images/common/st_nikkei_r1_20101003_1.gif' + #masthead_url = 'http://parts.nikkei.com/parts/ds/images/common/logo_r1.svg' + masthead_url = 'http://cdn.nikkei.co.jp/parts/ds/images/common/st_nikkei_r1_20101003_1.gif' + cover_margins = (10, 188, '#ffffff') remove_tags_before = {'class':"cmn-indent"} remove_tags = [ @@ -40,8 +43,11 @@ class NikkeiNet_paper_subscription(BasicNewsRecipe): print "-------------------------open top page-------------------------------------" br.open('http://www.nikkei.com/') print "-------------------------open first login form-----------------------------" - link = br.links(url_regex="www.nikkei.com/etc/accounts/login").next() - br.follow_link(link) + try: + url = br.links(url_regex="www.nikkei.com/etc/accounts/login").next().url + except StopIteration: + url = 'http://www.nikkei.com/etc/accounts/login?dps=3&pageflag=top&url=http%3A%2F%2Fwww.nikkei.com%2F' + br.open(url) #br.follow_link(link) #response = br.response() #print response.get_data() print "-------------------------JS redirect(send autoPostForm)--------------------" diff --git a/resources/content_server/browse/browse.css b/resources/content_server/browse/browse.css index 2c50853ae9..b32c470803 100644 --- a/resources/content_server/browse/browse.css +++ b/resources/content_server/browse/browse.css @@ -81,6 +81,7 @@ body { background-color: #39a9cf; -moz-border-radius: 5px; -webkit-border-radius: 5px; + border-radius: 5px; text-shadow: #27211b 1px 1px 1px; -moz-box-shadow: 5px 5px 5px #222; -webkit-box-shadow: 5px 5px 5px #222; diff --git a/src/calibre/devices/teclast/driver.py b/src/calibre/devices/teclast/driver.py index 192f03cb45..51ec8cc8f4 100644 --- a/src/calibre/devices/teclast/driver.py +++ b/src/calibre/devices/teclast/driver.py @@ -19,7 +19,8 @@ class TECLAST_K3(USBMS): PRODUCT_ID = [0x3203] BCD = [0x0000, 0x0100] - VENDOR_NAME = ['TECLAST', 'IMAGIN', 'RK28XX', 'PER3274B', 'BEBOOK'] + VENDOR_NAME = ['TECLAST', 'IMAGIN', 'RK28XX', 'PER3274B', 'BEBOOK', + 'RK2728'] WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['DIGITAL_PLAYER', 'TL-K5', 'EREADER', 'USB-MSC', 'PER3274B', 'BEBOOK'] diff --git a/src/calibre/ebooks/pdf/render/engine.py b/src/calibre/ebooks/pdf/render/engine.py index 047084d9af..47ed68f60b 100644 --- a/src/calibre/ebooks/pdf/render/engine.py +++ b/src/calibre/ebooks/pdf/render/engine.py @@ -306,8 +306,8 @@ class PdfEngine(QPaintEngine): image = pixmap.toImage() ref = self.add_image(image, pixmap.cacheKey()) if ref is not None: - self.pdf.draw_image(rect.x(), rect.y(), rect.width(), rect.height(), - ref) + self.pdf.draw_image(rect.x(), rect.height()+rect.y(), rect.width(), + -rect.height(), ref) @store_error def drawImage(self, rect, image, source_rect, flags=Qt.AutoColor): @@ -316,8 +316,8 @@ class PdfEngine(QPaintEngine): image.copy(source_rect)) ref = self.add_image(image, image.cacheKey()) if ref is not None: - self.pdf.draw_image(rect.x(), rect.y(), rect.width(), rect.height(), - ref) + self.pdf.draw_image(rect.x(), rect.height()+rect.y(), rect.width(), + -rect.height(), ref) def add_image(self, img, cache_key): if img.isNull(): return diff --git a/src/calibre/ebooks/pdf/render/serialize.py b/src/calibre/ebooks/pdf/render/serialize.py index 90e0558fe7..9fe89cfafb 100644 --- a/src/calibre/ebooks/pdf/render/serialize.py +++ b/src/calibre/ebooks/pdf/render/serialize.py @@ -423,10 +423,9 @@ class PDFStream(object): self.objects.commit(r, self.stream) return r - def draw_image(self, x, y, w, h, imgref): + def draw_image(self, x, y, xscale, yscale, imgref): name = self.current_page.add_image(imgref) - sx, sy = w, h - self.current_page.write('q %g 0 0 %g %g %g cm '%(sx, -sy, x, y+h)) + self.current_page.write('q %g 0 0 %g %g %g cm '%(xscale, yscale, x, y)) serialize(Name(name), self.current_page) self.current_page.write_line(' Do Q') diff --git a/src/calibre/gui2/dialogs/user_profiles.ui b/src/calibre/gui2/dialogs/user_profiles.ui index 6493846c2b..1e29477e6c 100644 --- a/src/calibre/gui2/dialogs/user_profiles.ui +++ b/src/calibre/gui2/dialogs/user_profiles.ui @@ -227,7 +227,7 @@ p, li { white-space: pre-wrap; }