Merge from trunk

This commit is contained in:
Charles Haley 2012-03-23 22:12:30 +01:00
commit 8fbf4e9e9a
87 changed files with 26381 additions and 22672 deletions

View File

@ -19,6 +19,61 @@
# new recipes: # new recipes:
# - title: # - title:
- version: 0.8.44
date: 2012-03-23
new features:
- title: "E-book viewer: A whole new full screen mode, with no toolbars to distract from the text and the ability to set the width of the column of text via Preferences in the ebook viewer."
type: major
tickets: [959830]
- title: "Copy to Library: If books were auto merged by the copy to library process, popup a message telling the user about it, as otherwise some people forget they have turned on auto merge and accuse calibre of losing their books."
- title: "Unix driver for Ectaco JetBook color"
tickets: [958442]
- title: "Add a link to the 'Adding Books Preferences' in the drop down menu of the Add Books button for easier access and more prominence"
tickets: [958145]
- title: "Smarten punctuation: Add a few more cases for detecting opening and closing quotes"
bug fixes:
- title: "Get Books: Updates to various store plugins to deal with website changes: Amazon Europe, Waterstones, Foyles, B&N, Kobo, Woblink and Empik"
- title: "Catalog generation: Do not error out when generating csv/xml catalogs if the catalog title contains filename invalid characters."
tickets: [960154]
- title: "RTF Output: Ignore corrupted images in the input document, instead of erroring out."
tickets: [959600]
- title: "E-book viewer: Try to preserve page position when the window is resized"
- title: "Fix bug that caused wrong series to be shown when clicking on the first letter of a series group in the Tag Browser"
- title: "Fix calibre not supporting different http and https proxies."
tickets: [960173]
- title: "MOBI Input: Fix regression caused by KF8 support that broke reading of ancient non-Amazon PRC files"
- title: "Fix EPUB to EPUB conversion of an EPUB with obfuscated fonts resulting in the fonts not being readable in Adobe Digital Editions"
tickets: [957527]
- title: "RTF Output: Fix bug that broke conversion to RTF when the input document contains <img> tags with no src attribute."
- title: "Fix regression in 0.8.43 that broke use of general mode templates that ended in a semi-colon."
tickets: [957295]
improved recipes:
- b92
- Various Polish news sources
- Le Monde
- FHM UK
new recipes:
- title: Ivana Milakovic and Klub knjige
author: Darko Miletic
- version: 0.8.43 - version: 0.8.43
date: 2012-03-16 date: 2012-03-16

View File

@ -1,4 +1,6 @@
__license__ = 'GPL v3' __license__ = 'GPL v3'
__author__ = 'faber1971'
description = 'Collection of Italian marketing websites - v1.04 (17, March 2012)'
from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds.news import BasicNewsRecipe
@ -9,12 +11,9 @@ class AdvancedUserRecipe1327062445(BasicNewsRecipe):
auto_cleanup = True auto_cleanup = True
remove_javascript = True remove_javascript = True
no_stylesheets = True no_stylesheets = True
conversion_options = {'linearize_tables': True}
remove_tags = [ remove_tags = [
dict(name='ul', attrs={'id':'ads0'}) dict(name='ul', attrs={'id':'ads0'})
] ]
masthead_url = 'http://www.simrendeogun.com/wp-content/uploads/2011/06/New-Marketing-Magazine-Logo.jpg' masthead_url = 'http://www.simrendeogun.com/wp-content/uploads/2011/06/New-Marketing-Magazine-Logo.jpg'
__author__ = 'faber1971' feeds = [(u'My Marketing', u'http://feed43.com/0537744466058428.xml'), (u'My Marketing_', u'http://feed43.com/8126723074604845.xml'), (u'Venturini', u'http://robertoventurini.blogspot.com/feeds/posts/default?alt=rss'), (u'Ninja Marketing', u'http://feeds.feedburner.com/NinjaMarketing'), (u'Comunitàzione', u'http://www.comunitazione.it/feed/novita.asp'), (u'Brandforum news', u'http://www.brandforum.it/rss/news'), (u'Brandforum papers', u'http://www.brandforum.it/rss/papers'), (u'MarketingArena', u'http://feeds.feedburner.com/marketingarena'), (u'minimarketing', u'http://feeds.feedburner.com/minimarketingit'), (u'Marketing Journal', u'http://feeds.feedburner.com/marketingjournal/jPwA'), (u'Disambiguando', u'http://giovannacosenza.wordpress.com/feed/')]
description = 'Collection of Italian marketing websites - v1.03 (20, February 2012)'
language = 'it'
feeds = [(u'My Marketing', u'http://feed43.com/0537744466058428.xml'), (u'My Marketing_', u'http://feed43.com/8126723074604845.xml'), (u'Venturini', u'http://robertoventurini.blogspot.com/feeds/posts/default?alt=rss'), (u'Ninja Marketing', u'http://feeds.feedburner.com/NinjaMarketing'), (u'Comunitàzione', u'http://www.comunitazione.it/feed/novita.asp'), (u'Brandforum news', u'http://www.brandforum.it/rss/news'), (u'Brandforum papers', u'http://www.brandforum.it/rss/papers'), (u'MarketingArena', u'http://feeds.feedburner.com/marketingarena'), (u'minimarketing', u'http://feeds.feedburner.com/minimarketingit'), (u'Disambiguando', u'http://giovannacosenza.wordpress.com/feed/')]

View File

@ -10,19 +10,19 @@ msgstr ""
"Report-Msgid-Bugs-To: Debian iso-codes team <pkg-isocodes-" "Report-Msgid-Bugs-To: Debian iso-codes team <pkg-isocodes-"
"devel@lists.alioth.debian.org>\n" "devel@lists.alioth.debian.org>\n"
"POT-Creation-Date: 2011-11-25 14:01+0000\n" "POT-Creation-Date: 2011-11-25 14:01+0000\n"
"PO-Revision-Date: 2011-09-27 16:03+0000\n" "PO-Revision-Date: 2012-03-18 12:56+0000\n"
"Last-Translator: Kovid Goyal <Unknown>\n" "Last-Translator: Vibhav Pant <vibhavp@gmail.com>\n"
"Language-Team: Hindi\n" "Language-Team: Hindi\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-11-26 05:19+0000\n" "X-Launchpad-Export-Date: 2012-03-19 04:40+0000\n"
"X-Generator: Launchpad (build 14381)\n" "X-Generator: Launchpad (build 14969)\n"
"Language: \n" "Language: \n"
#. name for aaa #. name for aaa
msgid "Ghotuo" msgid "Ghotuo"
msgstr "" msgstr "घोटुओ"
#. name for aab #. name for aab
msgid "Alumu-Tesu" msgid "Alumu-Tesu"
@ -30,7 +30,7 @@ msgstr ""
#. name for aac #. name for aac
msgid "Ari" msgid "Ari"
msgstr "" msgstr "अरी"
#. name for aad #. name for aad
msgid "Amal" msgid "Amal"
@ -58,11 +58,11 @@ msgstr ""
#. name for aak #. name for aak
msgid "Ankave" msgid "Ankave"
msgstr "" msgstr "अनकावे"
#. name for aal #. name for aal
msgid "Afade" msgid "Afade"
msgstr "" msgstr "अफ़ाडे"
#. name for aam #. name for aam
msgid "Aramanik" msgid "Aramanik"
@ -74,7 +74,7 @@ msgstr ""
#. name for aao #. name for aao
msgid "Arabic; Algerian Saharan" msgid "Arabic; Algerian Saharan"
msgstr "" msgstr "अरबी भाषा; अल्जीरियाई सहारा"
#. name for aap #. name for aap
msgid "Arára; Pará" msgid "Arára; Pará"
@ -94,11 +94,11 @@ msgstr ""
#. name for aat #. name for aat
msgid "Albanian; Arvanitika" msgid "Albanian; Arvanitika"
msgstr "" msgstr "अल्बानियन भाषा; अरवनितिका"
#. name for aau #. name for aau
msgid "Abau" msgid "Abau"
msgstr "" msgstr "अबाऊ"
#. name for aaw #. name for aaw
msgid "Solong" msgid "Solong"
@ -110,7 +110,7 @@ msgstr ""
#. name for aaz #. name for aaz
msgid "Amarasi" msgid "Amarasi"
msgstr "" msgstr "अमारासि"
#. name for aba #. name for aba
msgid "Abé" msgid "Abé"
@ -142,7 +142,7 @@ msgstr ""
#. name for abh #. name for abh
msgid "Arabic; Tajiki" msgid "Arabic; Tajiki"
msgstr "" msgstr "अरबी; ताजिकि"
#. name for abi #. name for abi
msgid "Abidji" msgid "Abidji"
@ -150,7 +150,7 @@ msgstr ""
#. name for abj #. name for abj
msgid "Aka-Bea" msgid "Aka-Bea"
msgstr "" msgstr "अका-बीआ"
#. name for abk #. name for abk
msgid "Abkhazian" msgid "Abkhazian"
@ -166,11 +166,11 @@ msgstr ""
#. name for abn #. name for abn
msgid "Abua" msgid "Abua"
msgstr "" msgstr "अबुआ"
#. name for abo #. name for abo
msgid "Abon" msgid "Abon"
msgstr "" msgstr "अबोन"
#. name for abp #. name for abp
msgid "Ayta; Abellen" msgid "Ayta; Abellen"
@ -178,7 +178,7 @@ msgstr ""
#. name for abq #. name for abq
msgid "Abaza" msgid "Abaza"
msgstr "" msgstr "अबाज़ा"
#. name for abr #. name for abr
msgid "Abron" msgid "Abron"
@ -186,7 +186,7 @@ msgstr ""
#. name for abs #. name for abs
msgid "Malay; Ambonese" msgid "Malay; Ambonese"
msgstr "" msgstr "मलय; अम्बोनीसी"
#. name for abt #. name for abt
msgid "Ambulas" msgid "Ambulas"

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
__appname__ = u'calibre' __appname__ = u'calibre'
numeric_version = (0, 8, 43) numeric_version = (0, 8, 44)
__version__ = u'.'.join(map(unicode, numeric_version)) __version__ = u'.'.join(map(unicode, numeric_version))
__author__ = u"Kovid Goyal <kovid@kovidgoyal.net>" __author__ = u"Kovid Goyal <kovid@kovidgoyal.net>"

View File

@ -109,6 +109,7 @@ class RTFMLizer(object):
if item.spine_position is None: if item.spine_position is None:
stylizer = Stylizer(item.data, item.href, self.oeb_book, stylizer = Stylizer(item.data, item.href, self.oeb_book,
self.opts, self.opts.output_profile) self.opts, self.opts.output_profile)
self.currently_dumping_item = item
output += self.dump_text(item.data.find(XHTML('body')), stylizer) output += self.dump_text(item.data.find(XHTML('body')), stylizer)
output += '{\\page }' output += '{\\page }'
for item in self.oeb_book.spine: for item in self.oeb_book.spine:
@ -118,6 +119,7 @@ class RTFMLizer(object):
content = self.remove_tabs(content) content = self.remove_tabs(content)
content = etree.fromstring(content) content = etree.fromstring(content)
stylizer = Stylizer(content, item.href, self.oeb_book, self.opts, self.opts.output_profile) stylizer = Stylizer(content, item.href, self.oeb_book, self.opts, self.opts.output_profile)
self.currently_dumping_item = item
output += self.dump_text(content.find(XHTML('body')), stylizer) output += self.dump_text(content.find(XHTML('body')), stylizer)
output += '{\\page }' output += '{\\page }'
output += self.footer() output += self.footer()
@ -160,9 +162,15 @@ class RTFMLizer(object):
for item in self.oeb_book.manifest: for item in self.oeb_book.manifest:
if item.media_type in OEB_RASTER_IMAGES: if item.media_type in OEB_RASTER_IMAGES:
src = os.path.basename(item.href) src = item.href
data, width, height = self.image_to_hexstring(item.data) try:
text = text.replace('SPECIAL_IMAGE-%s-REPLACE_ME' % src, '\n\n{\\*\\shppict{\\pict\\picw%i\\pich%i\\jpegblip \n%s\n}}\n\n' % (width, height, data)) data, width, height = self.image_to_hexstring(item.data)
except:
self.log.warn('Image %s is corrupted, ignoring'%item.href)
repl = '\n\n'
else:
repl = '\n\n{\\*\\shppict{\\pict\\jpegblip\\picw%i\\pich%i \n%s\n}}\n\n' % (width, height, data)
text = text.replace('SPECIAL_IMAGE-%s-REPLACE_ME' % src, repl)
return text return text
def image_to_hexstring(self, data): def image_to_hexstring(self, data):
@ -205,7 +213,8 @@ class RTFMLizer(object):
return text return text
def dump_text(self, elem, stylizer, tag_stack=[]): def dump_text(self, elem, stylizer, tag_stack=[]):
from calibre.ebooks.oeb.base import XHTML_NS, namespace, barename from calibre.ebooks.oeb.base import (XHTML_NS, namespace, barename,
urlnormalize)
if not isinstance(elem.tag, basestring) \ if not isinstance(elem.tag, basestring) \
or namespace(elem.tag) != XHTML_NS: or namespace(elem.tag) != XHTML_NS:
@ -236,7 +245,7 @@ class RTFMLizer(object):
if tag == 'img': if tag == 'img':
src = elem.get('src') src = elem.get('src')
if src: if src:
src = os.path.basename(elem.get('src')) src = urlnormalize(self.currently_dumping_item.abshref(src))
block_start = '' block_start = ''
block_end = '' block_end = ''
if 'block' not in tag_stack: if 'block' not in tag_stack:

View File

@ -13,6 +13,7 @@ from calibre.gui2 import choose_dir, error_dialog, warning_dialog
from calibre.gui2.tools import generate_catalog from calibre.gui2.tools import generate_catalog
from calibre.utils.config import dynamic from calibre.utils.config import dynamic
from calibre.gui2.actions import InterfaceAction from calibre.gui2.actions import InterfaceAction
from calibre import sanitize_file_name_unicode
class GenerateCatalogAction(InterfaceAction): class GenerateCatalogAction(InterfaceAction):
@ -89,7 +90,8 @@ class GenerateCatalogAction(InterfaceAction):
_('Select destination for %(title)s.%(fmt)s') % dict( _('Select destination for %(title)s.%(fmt)s') % dict(
title=job.catalog_title, fmt=job.fmt.lower())) title=job.catalog_title, fmt=job.fmt.lower()))
if export_dir: if export_dir:
destination = os.path.join(export_dir, '%s.%s' % (job.catalog_title, job.fmt.lower())) destination = os.path.join(export_dir, '%s.%s' % (
sanitize_file_name_unicode(job.catalog_title), job.fmt.lower()))
shutil.copyfile(job.catalog_file_path, destination) shutil.copyfile(job.catalog_file_path, destination)

View File

@ -709,6 +709,7 @@ class DocumentView(QWebView): # {{{
if self.manager is not None: if self.manager is not None:
self.manager.load_started() self.manager.load_started()
self.loading_url = QUrl.fromLocalFile(path) self.loading_url = QUrl.fromLocalFile(path)
html = re.sub(r'<\s*title\s*/\s*>', '', html, flags=re.IGNORECASE)
if has_svg: if has_svg:
self.setContent(QByteArray(html.encode(path.encoding)), mt, QUrl.fromLocalFile(path)) self.setContent(QByteArray(html.encode(path.encoding)), mt, QUrl.fromLocalFile(path))
else: else:

View File

@ -268,6 +268,9 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
self.connect(self.action_full_screen, SIGNAL('triggered(bool)'), self.connect(self.action_full_screen, SIGNAL('triggered(bool)'),
self.toggle_fullscreen) self.toggle_fullscreen)
self.action_full_screen.setShortcuts([Qt.Key_F11, Qt.CTRL+Qt.SHIFT+Qt.Key_F]) self.action_full_screen.setShortcuts([Qt.Key_F11, Qt.CTRL+Qt.SHIFT+Qt.Key_F])
self.action_full_screen.setToolTip(_('Toggle full screen (%s)') %
_(' or ').join([unicode(x.toString(x.NativeText)) for x in
self.action_full_screen.shortcuts()]))
self.connect(self.action_back, SIGNAL('triggered(bool)'), self.back) self.connect(self.action_back, SIGNAL('triggered(bool)'), self.back)
self.connect(self.action_bookmark, SIGNAL('triggered(bool)'), self.bookmark) self.connect(self.action_bookmark, SIGNAL('triggered(bool)'), self.bookmark)
self.connect(self.action_forward, SIGNAL('triggered(bool)'), self.forward) self.connect(self.action_forward, SIGNAL('triggered(bool)'), self.forward)

View File

@ -284,9 +284,6 @@
<property name="text"> <property name="text">
<string>Toggle full screen</string> <string>Toggle full screen</string>
</property> </property>
<property name="toolTip">
<string>Toggle full screen (F11)</string>
</property>
</action> </action>
<action name="action_print"> <action name="action_print">
<property name="icon"> <property name="icon">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff