summaryrefslogtreecommitdiff
path: root/libre/calibre/libre.patch
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2019-10-11 04:15:56 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2019-10-11 06:39:58 -0400
commitd3e05e0af22e380df9069dc24b2dfde92de5f1b4 (patch)
tree5dbdc1982f51cbf5dd224f86639d7602573d02ce /libre/calibre/libre.patch
parent8183d329491a525f976afee5bc6db661a40ab3cc (diff)
downloadabslibre-d3e05e0af22e380df9069dc24b2dfde92de5f1b4.tar.gz
abslibre-d3e05e0af22e380df9069dc24b2dfde92de5f1b4.tar.bz2
abslibre-d3e05e0af22e380df9069dc24b2dfde92de5f1b4.zip
[calibre]: upgrade to v3.48.0
Diffstat (limited to 'libre/calibre/libre.patch')
-rw-r--r--libre/calibre/libre.patch138
1 files changed, 69 insertions, 69 deletions
diff --git a/libre/calibre/libre.patch b/libre/calibre/libre.patch
index 4c3e65c16..20fefb07b 100644
--- a/libre/calibre/libre.patch
+++ b/libre/calibre/libre.patch
@@ -3,34 +3,34 @@
@@ -747,7 +747,7 @@
Comic book collections
~~~~~~~~~~~~~~~~~~~~~~~~~
-
+
-A comic book collection is a .cbc file. A .cbc file is a ZIP file that contains other CBZ/CBR files. In addition the
+A comic book collection is a .cbc file. A .cbc file is a ZIP file that contains other CBZ files. In addition the
.cbc file must contain a simple text file called comics.txt, encoded in UTF-8. The comics.txt file must contain
a list of the comics files inside the .cbc file, in the form filename:title, as shown below::
-
+
--- calibre-3.46.0.orig/manual/faq.rst 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/manual/faq.rst 2019-08-26 01:07:40.285096018 -0500
@@ -18,7 +18,7 @@
calibre supports the conversion of many input formats to many output formats.
It can convert every input format in the following list, to every output format.
-
+
-*Input Formats:* AZW, AZW3, AZW4, CBZ, CBR, CBC, CHM, DJVU, DOCX, EPUB, FB2, FBZ, HTML, HTMLZ, LIT, LRF, MOBI, ODT, PDF, PRC, PDB, PML, RB, RTF, SNB, TCR, TXT, TXTZ
+*Input Formats:* AZW, AZW3, AZW4, CBZ, CBC, CHM, DJVU, DOCX, EPUB, FB2, FBZ, HTML, HTMLZ, LIT, LRF, MOBI, ODT, PDF, PRC, PDB, PML, RB, RTF, SNB, TCR, TXT, TXTZ
-
+
*Output Formats:* AZW3, EPUB, DOCX, FB2, HTMLZ, OEB, LIT, LRF, MOBI, PDB, PMLZ, RB, PDF, RTF, SNB, TCR, TXT, TXTZ, ZIP
-
+
--- calibre-3.46.0.orig/manual/gui.rst 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/manual/gui.rst 2019-08-26 01:09:15.315095026 -0500
@@ -51,7 +51,7 @@
-
+
3. **Add books from directories, including sub-directories (Multiple books per directory, assumes every e-book file is a different book)**: Allows you to choose a directory. The directory and all its sub-directories are scanned recursively and any e-books found are added to the library. calibre assumes that each directory contains many books. All e-book files with the same name in a directory are assumed to be the same book in different formats. E-books with different names are added as different books.
-
+
- 4. **Add multiple books from archive (ZIP/RAR)**: Allows you to add multiple e-books that are stored inside the selected ZIP or RAR files. It is a convenient shortcut that avoids having to first unzip the archive and then add the books via one of the above two options.
+ 4. **Add multiple books from archive (ZIP)**: Allows you to add multiple e-books that are stored inside the selected ZIP files. It is a convenient shortcut that avoids having to first unzip the archive and then add the books via one of the above two options.
-
+
5. **Add empty book (Book Entry with no formats)**: Allows you to create a blank book record. This can be used to then manually fill out the information about a book that you may not have yet in your collection.
-
+
--- calibre-3.46.0.orig/resources/mime.types 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/resources/mime.types 2019-08-26 01:12:33.905092952 -0500
@@ -138,7 +138,6 @@
@@ -72,12 +72,12 @@
+++ calibre-3.46.0/src/calibre/customize/builtins.py 2019-08-26 16:19:10.547135583 -0500
@@ -133,7 +133,7 @@
class ComicMetadataReader(MetadataReaderPlugin):
-
+
name = 'Read comic metadata'
- file_types = {'cbr', 'cbz'}
+ file_types = {'cbz'}
description = _('Extract cover from comic files')
-
+
def customization_help(self, gui=False):
@@ -144,19 +144,14 @@
pos = stream.tell()
@@ -104,8 +104,8 @@
series_index = 'volume'
@@ -355,17 +350,6 @@
return get_metadata(stream)
-
-
+
+
-class RARMetadataReader(MetadataReaderPlugin):
-
- name = 'Read RAR metadata'
@@ -118,7 +118,7 @@
-
-
class RBMetadataReader(MetadataReaderPlugin):
-
+
name = 'Read RB metadata'
--- calibre-3.46.0.orig/src/calibre/customize/ui.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/customize/ui.py 2019-08-26 16:22:32.957136847 -0500
@@ -129,56 +129,56 @@
- formats.add('zip'), formats.add('rar')
+ formats.add('zip')
return formats
-
-
+
+
--- calibre-3.46.0.orig/src/calibre/devices/kobo/driver.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/devices/kobo/driver.py 2019-08-26 16:24:06.647137432 -0500
@@ -92,7 +92,7 @@
book_class = Book
-
+
# Ordered list of supported formats
- FORMATS = ['kepub', 'epub', 'pdf', 'txt', 'cbz', 'cbr']
+ FORMATS = ['kepub', 'epub', 'pdf', 'txt', 'cbz']
CAN_SET_METADATA = ['collections']
-
+
VENDOR_ID = [0x2237]
--- calibre-3.46.0.orig/src/calibre/devices/misc.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/devices/misc.py 2019-08-26 16:25:22.907137908 -0500
@@ -448,7 +448,7 @@
EBOOK_DIR_MAIN = 'Documents'
SCAN_FROM_ROOT = True
-
+
- VENDOR_NAME = ['ROCKCHIP', 'CBR']
+ VENDOR_NAME = ['ROCKCHIP']
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['RK28_SDK_DEMO', 'EINK_EBOOK_READE']
SUPPORTS_SUB_DIRS = True
-
+
--- calibre-3.46.0.orig/src/calibre/devices/mtp/filesystem_cache.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/devices/mtp/filesystem_cache.py 2019-08-26 16:26:18.837138258 -0500
@@ -17,7 +17,7 @@
from calibre.utils.icu import sort_key, lower
from calibre.ebooks import BOOK_EXTENSIONS
-
+
-bexts = frozenset(BOOK_EXTENSIONS) - {'mbp', 'tan', 'rar', 'zip', 'xml'}
+bexts = frozenset(BOOK_EXTENSIONS) - {'mbp', 'tan', 'zip', 'xml'}
-
-
+
+
class FileOrFolder(object):
--- calibre-3.46.0.orig/src/calibre/ebooks/comic/__init__.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/ebooks/comic/__init__.py 2019-08-26 16:28:07.637138937 -0500
@@ -6,7 +6,7 @@
__docformat__ = 'restructuredtext en'
-
+
'''
-Convert CBR/CBZ files to LRF.
+Convert CBZ files to LRF.
'''
-
+
import sys
--- calibre-3.46.0.orig/src/calibre/ebooks/conversion/plugins/comic_input.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/ebooks/conversion/plugins/comic_input.py 2019-08-26 16:30:49.127139946 -0500
@@ -20,8 +20,8 @@
-
+
name = 'Comic Input'
author = 'Kovid Goyal'
- description = 'Optimize comic files (.cbz, .cbr, .cbc) for viewing on portable devices'
@@ -191,29 +191,29 @@
--- calibre-3.46.0.orig/src/calibre/ebooks/conversion/plumber.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/ebooks/conversion/plumber.py 2019-08-26 16:32:33.387140597 -0500
@@ -46,7 +46,7 @@
-
+
def supported_input_formats():
fmts = available_input_formats()
- for x in ('zip', 'rar', 'oebzip'):
+ for x in ('zip', 'oebzip'):
fmts.add(x)
return fmts
-
+
@@ -67,7 +67,7 @@
self.global_reporter(global_frac, msg)
-
-
+
+
-ARCHIVE_FMTS = ('zip', 'rar', 'oebzip')
+ARCHIVE_FMTS = ('zip', 'oebzip')
-
-
+
+
class Plumber(object):
--- calibre-3.46.0.orig/src/calibre/ebooks/__init__.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/ebooks/__init__.py 2019-08-26 16:33:48.557141066 -0500
@@ -33,9 +33,9 @@
pass
-
-
+
+
-BOOK_EXTENSIONS = ['lrf', 'rar', 'zip', 'rtf', 'lit', 'txt', 'txtz', 'text', 'htm', 'xhtm',
+BOOK_EXTENSIONS = ['lrf', 'zip', 'rtf', 'lit', 'txt', 'txtz', 'text', 'htm', 'xhtm',
'html', 'htmlz', 'xhtml', 'pdf', 'pdb', 'updb', 'pdr', 'prc', 'mobi', 'azw', 'doc',
@@ -245,7 +245,7 @@
+ file_types = set(['zip'])
supported_platforms = ['windows', 'osx', 'linux']
on_import = True
-
+
def run(self, archive):
from calibre.utils.zipfile import ZipFile
- is_rar = archive.lower().endswith('.rar')
@@ -260,11 +260,11 @@
- fnames = zf.namelist()
+ zf = ZipFile(archive, 'r')
+ fnames = zf.namelist()
-
+
def fname_ok(fname):
bn = os.path.basename(fname).lower()
@@ -76,7 +66,7 @@
-
+
fnames = list(filter(fname_ok, fnames))
if is_comic(fnames):
- ext = '.cbr' if is_rar else '.cbz'
@@ -273,7 +273,7 @@
with open(archive, 'rb') as f:
of.write(f.read())
@@ -93,11 +83,7 @@
-
+
of = self.temporary_file('_archive_extract.'+ext)
with closing(of):
- if is_rar:
@@ -283,8 +283,8 @@
- of.write(zf.read(fname))
+ of.write(zf.read(fname))
return of.name
-
-
+
+
@@ -168,8 +154,5 @@
from calibre.utils.zipfile import ZipFile
zf = ZipFile(stream)
@@ -292,7 +292,7 @@
- elif stream_type == 'cbr':
- from calibre.utils.unrar import comment as get_comment
- comment = get_comment(stream)
-
+
return parse_comic_comment(comment or b'{}', series_index=series_index)
--- calibre-3.46.0.orig/src/calibre/ebooks/oeb/iterator/book.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/ebooks/oeb/iterator/book.py 2019-08-26 16:48:49.227146691 -0500
@@ -317,7 +317,7 @@
+ (_('Archives'), ['zip']),
(_('Wordprocessor files'), ['odt', 'doc', 'docx']),
]
-
+
@@ -65,7 +65,7 @@
'sub-directories (Multiple books per directory, assumes every '
'e-book file is a different book)')).triggered.connect(
@@ -335,7 +335,7 @@
+ filters=[(_('Archives'), ('zip'))], all_files=False, select_only_single_file=False)
if paths:
self.do_add_recursive(paths, single, list_of_archives=True)
-
+
--- calibre-3.46.0.orig/src/calibre/gui2/actions/preferences.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/gui2/actions/preferences.py 2019-08-26 17:14:54.687156468 -0500
@@ -29,8 +29,6 @@
@@ -357,7 +357,7 @@
- from calibre.utils.unrar import extract
- extract(source, tdir)
return tdir
-
+
try:
--- calibre-3.46.0.orig/src/calibre/gui2/__init__.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/gui2/__init__.py 2019-08-26 17:20:41.207158632 -0500
@@ -373,13 +373,13 @@
--- calibre-3.46.0.orig/src/calibre/gui2/preferences/behavior.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/gui2/preferences/behavior.py 2019-08-26 17:21:59.877159123 -0500
@@ -41,7 +41,6 @@
-
+
r('network_timeout', prefs)
-
+
- r('new_version_notification', config)
r('upload_news_to_device', config)
r('delete_news_from_library_on_upload', config)
-
+
@@ -141,7 +140,7 @@
input_map = prefs['input_format_order']
all_formats = set()
@@ -407,13 +407,13 @@
<property name="text">
--- calibre-3.46.0.orig/src/calibre/gui2/update.py 2019-07-18 22:19:21.000000000 -0500
+++ calibre-3.46.0/src/calibre/gui2/update.py 2019-08-26 17:30:02.797162139 -0500
-@@ -6,15 +6,13 @@
+@@ -7,15 +7,13 @@ import re, ssl, json
from threading import Thread, Event
-
+
from PyQt5.Qt import (QObject, pyqtSignal, Qt, QUrl, QDialog, QGridLayout,
- QLabel, QCheckBox, QDialogButtonBox, QIcon)
+ QLabel, QCheckBox, QIcon)
-
+
-from calibre.constants import (__appname__, __version__, iswindows, isosx,
+from calibre.constants import (__appname__, iswindows, isosx,
isportable, is64bit, numeric_version)
@@ -426,9 +426,9 @@
from calibre.gui2.dialogs.plugin_updater import get_plugin_updates_available
from calibre.utils.serialize import msgpack_dumps, msgpack_loads
from polyglot.binary import as_hex_unicode, from_hex_bytes
-@@ -33,35 +31,7 @@
-
-
+@@ -35,35 +33,7 @@ def get_download_url():
+
+
def get_newest_version():
- try:
- icon_theme_name = json.loads(I('icon-theme.json', data=True))['name']
@@ -453,30 +453,30 @@
- try:
- version = version.decode('utf-8').strip()
- except UnicodeDecodeError:
-- version = u''
+- version = ''
- ans = NO_CALIBRE_UPDATE
- m = re.match(unicode_type(r'(\d+)\.(\d+).(\d+)$'), version)
- if m is not None:
- ans = tuple(map(int, (m.group(1), m.group(2), m.group(3))))
- return ans
+ return NO_CALIBRE_UPDATE
-
-
+
+
class Signal(QObject):
-@@ -84,12 +54,6 @@
+@@ -85,12 +55,6 @@ class CheckForUpdates(Thread):
+ while not self.shutdown_event.is_set():
calibre_update_version = NO_CALIBRE_UPDATE
plugins_update_found = 0
- try:
+- try:
- version = get_newest_version()
- if version[:2] > numeric_version[:2]:
- calibre_update_version = version
- except Exception as e:
- prints('Failed to check for calibre update:', as_unicode(e))
-- try:
+ try:
update_plugins = get_plugin_updates_available(raise_error=True)
if update_plugins is not None:
- plugins_update_found = len(update_plugins)
-@@ -148,11 +112,6 @@
+@@ -150,11 +114,6 @@ class UpdateNotification(QDialog):
self.setWindowIcon(QIcon(I('lt.png')))
self.l.addWidget(self.logo, 0, 0)
self.l.addWidget(self.label, 0, 1)
@@ -488,19 +488,19 @@
self.bb = QDialogButtonBox(self)
b = self.bb.addButton(_('&Get update'), self.bb.AcceptRole)
b.setDefault(True)
-@@ -180,9 +139,6 @@
+@@ -182,9 +141,6 @@ class UpdateNotification(QDialog):
if gui is not None:
gui.quit(restart=True)
-
+
- def show_future(self, *args):
- config.set('new_version_notification', bool(self.cb.isChecked()))
-
def accept(self):
open_url(QUrl(get_download_url()))
-
-@@ -230,7 +186,7 @@
+
+@@ -232,7 +188,7 @@ class UpdateMixin(object):
self.status_bar.update_label.setVisible(True)
-
+
if has_calibre_update:
- if (force or (config.get('new_version_notification') and not is_version_notified(calibre_version))):
+ if force:
@@ -558,7 +558,7 @@
@@ -110,27 +110,6 @@
with TestServer(lambda data:(data.path[0] + data.read()), listen_on='1.1.1.1', fallback_to_detected_interface=True, specialize=specialize) as server:
self.assertNotEqual('1.1.1.1', server.address[0])
-
+
- @skipIf(is_ci, 'Continuous Integration servers do not support BonJour')
- def test_bonjour(self):
- 'Test advertising via BonJour'
@@ -588,7 +588,7 @@
@@ -236,10 +236,6 @@
from calibre.gui2.win_file_dialogs import test
test()
-
+
- def test_unrar(self):
- from calibre.utils.unrar import test_basic
- test_basic()
@@ -813,5 +813,5 @@
- u'lrf,rar']
+ u'lrf']
}
-
+
tests = {