Commit Graph

38029 Commits

Author SHA1 Message Date
Kovid Goyal e501fa8d86 Fix converting RTF files with debug pipeline not working 2019-05-21 19:17:28 +05:30
Kovid Goyal 031756c4bc py3: Port the catalog generation GUI 2019-05-21 19:00:02 +05:30
Kovid Goyal 2952e47fa4 py3: More str() and unicode_literals fixes 2019-05-20 19:22:45 +05:30
Kovid Goyal 9d14bebafb Fix str() and unicode_literals in odf package 2019-05-20 17:17:33 +05:30
Kovid Goyal 43c0b1216e Fixes found by check 2019-05-20 16:56:45 +05:30
Kovid Goyal 7ab9970d33 ... 2019-05-20 16:52:53 +05:30
Kovid Goyal 8366df8637 Run code quality checks on the odf package 2019-05-20 16:52:16 +05:30
Kovid Goyal 609892eb81 Run autopep8 on odf2xhtml 2019-05-20 16:14:07 +05:30
Kovid Goyal ed1571af6e py3: remove has_key from odf2xhtml 2019-05-20 16:12:42 +05:30
Kovid Goyal cb5ac309fa py3: More fixes to RTF input
Embedded WMF image processing now works
2019-05-20 15:50:36 +05:30
Kovid Goyal 037e28a442 py3: misc fixes for RTF input 2019-05-20 15:24:05 +05:30
Kovid Goyal 27580b8cbe py3: use unicode literals in rtf2xml 2019-05-20 15:22:04 +05:30
Kovid Goyal 6e157be8fa py3: centralize creation of rtf file objects so they can be controlled easily 2019-05-20 15:04:41 +05:30
Kovid Goyal 3e64b73c96 py3: make mreplace polyglot 2019-05-20 13:40:20 +05:30
Kovid Goyal 749885778d Some fixes to the last py3 merge 2019-05-20 12:57:05 +05:30
Kovid Goyal 4c5e9a20a4 Merge branch 'py3' of https://github.com/eli-schwartz/calibre 2019-05-20 12:20:25 +05:30
Eli Schwartz c6e0698c36 py3: partial work towards making rtf2xml actually work 2019-05-20 00:55:14 -04:00
Eli Schwartz a8a74b7c53 py3: use proper dict.keys() handling 2019-05-20 00:55:14 -04:00
Eli Schwartz 4b0e241555 py3: make pdf input work 2019-05-20 00:55:13 -04:00
Eli Schwartz 9f65185da3 py3: make fb2 input work 2019-05-20 00:55:13 -04:00
Eli Schwartz aa43816d09 py3: make txtz input work 2019-05-20 00:55:13 -04:00
Eli Schwartz fda2ab0024 py3: make html output work
The templates are initialized as decoded unicode strings, and templite
expects to work in unicode strings as well. However, etree.tostring
returns a bytestring unless explicitly told to use the 'unicode'
encoding ('utf-8' is not enough)
2019-05-20 00:55:13 -04:00
Eli Schwartz f75ea236e5 py3: make templite templates use python3-compatible syntax 2019-05-20 00:55:13 -04:00
Eli Schwartz 65c0ca944b py3: make pml input work
Opening a file in binary mode in python3 returns a BufferedReader which
does not have an encoding attribute. Assume in this case it is
functionally equivalent to None.

I'm not sure when pml_stream.encoding will ever equal anything, since
even on python2 the attribute exists but is None when opening files in
binary mode... which we explicitly do. So I'm not sure why this ever
checks the existing encoding. Possibly when the input plugin is given a
file opened in text mode, not raw mode? in that case, it may be wrong to
always decode it when reading.
2019-05-20 00:55:13 -04:00
Eli Schwartz 1ed017fabd py3: make pmlz output work
in python3, the re module is more picky about what arguments are used
with it, and invalid escapes do not fall back on being treated as string
literals, but raise an error. Use raw strings to ensure that the escaped
backslashes are preserved all the way to the regular expressions
themselves.
2019-05-20 00:55:13 -04:00
Eli Schwartz 8e368c0d46 py3: more fixes for snb output
string.split is deprecated, use native functions on the original string
itself.
2019-05-20 00:55:13 -04:00
Eli Schwartz 4bbc8df3ab py3: make pdb input work 2019-05-20 00:55:13 -04:00
Eli Schwartz 047d539e0a py3: os.walk explicitly returns bytes when given a bytes argument
And therefore when replacing paths in it, we need to use bytes as well.
2019-05-20 00:55:13 -04:00
Eli Schwartz 00ed9305cb py3: fix mobi ncx
get_id_tag/get_id_tag_by_pos_fid are internal functions that always
return bytes, but when using the former proxied through the latter, we
did not always decode the result in the process of generating an OPF.

As a result, books would end up with nav links pointing to urls
resembling "foo.html#b'anchor'".

Fix by moving down the decode attempt to cover both, right before
writing it back into the index_entries.
2019-05-20 00:55:13 -04:00
Eli Schwartz ab7e134a40 py3: make pdb output work 2019-05-20 00:55:13 -04:00
Kovid Goyal f32ea26bf1 py3: Port more files to not use str() andhave unicode literals 2019-05-20 06:56:45 +05:30
Kovid Goyal a1e75e9bc2 Merge branch 'py3' of https://github.com/eli-schwartz/calibre 2019-05-20 06:44:04 +05:30
Eli Schwartz 3a4acd5826 py3: fix regression in commit 96a8aeaaf5
Strings that contain non-ascii literal characters cannot be made into
bytestrings merely by adding b'' and must either be encoded or use
hex escapes.
2019-05-19 21:05:16 -04:00
Kovid Goyal 38279c5280 Update The Toronto Star 2019-05-20 06:33:36 +05:30
Kovid Goyal ee97edc94d Merge branch 'calibre-complete' of https://github.com/eli-schwartz/calibre 2019-05-20 06:31:45 +05:30
Eli Schwartz 09b4218b83 py3: recursive forcing to unicode missed converting set()
This resulted in e.g. ebook-convert-complete still storing most formats
in msgpack as bytestrings, and therefore not being completed.
2019-05-19 14:34:47 -04:00
Kovid Goyal b7d2c4b502 Merge branch 'master' of https://github.com/j-howell/calibre 2019-05-19 19:33:54 +05:30
j-howell 21b61b1040 Further improve handling of books with both old and new style KFX metadata 2019-05-19 08:35:38 -04:00
Kovid Goyal 3013170e56 Merge branch 'py3-bootstrapping' of https://github.com/aimylios/calibre 2019-05-19 14:31:39 +05:30
Kovid Goyal 14b7f0b51e py3: Use unicode_literals and migrate str() in a few more files 2019-05-19 14:29:14 +05:30
Aimylios 63e1d1e894 py3: Remove last occurrence of os.getcwdu() 2019-05-19 10:26:50 +02:00
Kovid Goyal 052cb43ae1 py3: Use unicode_literals and migrate str() in a few more files 2019-05-19 13:20:26 +05:30
Kovid Goyal 7f7c83a709 Remove non-working recipe 2019-05-18 19:09:52 +05:30
Kovid Goyal 96a8aeaaf5 py3: Fix login checks in various recipes 2019-05-18 18:55:02 +05:30
Kovid Goyal 1de94d39e2 Report detected image type in exception 2019-05-18 15:41:38 +05:30
Kovid Goyal 166f16374b Update The Financial Express 2019-05-18 15:34:29 +05:30
Kovid Goyal 6e414d293b Update London Review of Books
Fixes #1829339 [Private bug](https://bugs.launchpad.net/calibre/+bug/1829339)
2019-05-18 15:01:14 +05:30
Kovid Goyal 69f29dc1e1 ... 2019-05-18 13:01:47 +05:30
Kovid Goyal 4e604e52d7 PDF Output: Fix hang when converting some documents. Fixes #1829535 [ebook-convert hangs on some HTML to PDF conversions](https://bugs.launchpad.net/calibre/+bug/1829535) 2019-05-17 21:02:30 +05:30
Kovid Goyal 3d586aa15a PDF Output: Remove JS from HTML files before passing them to WebKit 2019-05-17 20:39:24 +05:30