31298 Commits

Author SHA1 Message Date
Eli Schwartz
8e773ae855
py3: fix metadata panel showing roman series numbers
python3 zip() is depleted the first time you use it, but this will need
to be used many times.
2019-05-06 17:17:34 -04:00
Claire
a2418620bf Store a copy of rules in stylizer 2019-05-06 23:11:43 +02:00
Claire
f3f741a1fa Storing rules in oeb and rules comparison function 2019-05-05 13:21:25 +02:00
Kovid Goyal
6aad4c495e
Nicer error messages when import Qt modules fail in the build tests 2019-05-05 14:09:19 +05:30
Claire
2094df04c3 Avoid generating the same Stylizer rules again 2019-05-05 08:04:04 +02:00
Kovid Goyal
9709efaba9
Prevent errors in tweaks.py from preventing calibre startup 2019-05-03 06:44:08 +05:30
Kovid Goyal
28a07b0727
py3 compat 2019-05-02 15:18:41 +05:30
Charles Haley
e8afb87d9d Fix problem when CC accesses the content server with the option device_for_template. Fixes exception
Traceback (most recent call last):
  File "C:\CBH_Data\calibre.git\calibre_dev\src\calibre\srv\ajax.py", line 141, in book_to_json
  File "C:\CBH_Data\calibre.git\calibre_dev\src\calibre\devices\utils.py", line 98, in create_upload_path
  File "C:\CBH_Data\calibre.git\calibre_dev\src\calibre\utils\filenames.py", line 40, in ascii_filename
  File "C:\CBH_Data\calibre.git\calibre_dev\src\calibre\utils\filenames.py", line 30, in ascii_text
AttributeError: 'int' object has no attribute 'decode'
2019-05-02 10:27:53 +01:00
Eli Schwartz
4a49ea4352
py3: make column rules editor work
The sort key grades each string as a bytestring, so falling back on an
integer is incorrect.
2019-05-01 11:23:27 -04:00
Eli Schwartz
d9918b5b9c
py3: make cover grid texture selection work
map() is an iterable, so using it as a shortcut for a proper for loop in
order to apply functions, is no longer valid.

Also move from the long deprecated string.*() functions -- which no
longer exist in python3 -- that are better dealt with through the native
str/unicode type methods.
2019-05-01 11:23:27 -04:00
Kovid Goyal
9714f722e7
Fix metadata download form Amazon stripping accents from comments text in the binary builds
Seems to be caused by a bug in the lxml version in the builds, which
causes it to output unicode chars as entities, which in turn were
getting stripped by the sanitize_html() function. Fixes #1825905 [amazon scrapper not retrieving accented caracters](https://bugs.launchpad.net/calibre/+bug/1825905)
2019-05-01 19:04:12 +05:30
Kovid Goyal
ad9627f14a
py3: Mix fixes 2019-05-01 18:51:09 +05:30
Kovid Goyal
6f355b5297
py3: fix sorting dictionaries when some of their names might be None 2019-05-01 17:25:34 +05:30
Kovid Goyal
1473f4a83e
Forgot to remove unused dot object 2019-05-01 17:14:05 +05:30
Kovid Goyal
d324e776b5
Greatly simplify unicode_to_number
This also has the virtue of making number parsing locale independent, as
is required for parsing CSS literals
2019-05-01 17:10:21 +05:30
Kovid Goyal
3de9c83787
pep8 2019-05-01 16:42:43 +05:30
Kovid Goyal
2ed54d1782
Make the db and server tests locale independent 2019-05-01 16:31:02 +05:30
Kovid Goyal
d1f94b510c
Fix translator for English not being returned on other locales 2019-05-01 14:34:05 +05:30
Kovid Goyal
7f099475b2
Fix bing search query parser to work with mobile UAs 2019-04-30 17:51:24 +05:30
Kovid Goyal
b9c781b5e0
py3: Port some remaining uses of has_key() 2019-04-30 17:24:05 +05:30
Kovid Goyal
a31151e864
Amazon metadata download: Fix some downloads failing when a mobile user agent is randomnly selected. Fixes #1827027 [meta data request to amazon failed for some user agents](https://bugs.launchpad.net/calibre/+bug/1827027)
Amazon serves up different markup to mobile browsers, so ensure we dont
use them.
2019-04-30 16:59:08 +05:30
Kovid Goyal
e6fd5e4c0c
Fix some mobile user agents not being filtered out from random_user_agent 2019-04-30 16:34:03 +05:30
Kovid Goyal
30232ebd52
py3: Port LRF Output 2019-04-30 16:11:56 +05:30
Kovid Goyal
f1b0cb58ac
LRF Output: Generat UTF-8 not UTF-16 metadata blocks 2019-04-30 16:00:21 +05:30
Kovid Goyal
bc7b5b05a7
LRF Input: Fix a regression that broke parsing LRF files. Fixes #1826970 [lrf format is not supported in any way](https://bugs.launchpad.net/calibre/+bug/1826970) 2019-04-30 08:48:13 +05:30
Kovid Goyal
a2fa719545
Better naming 2019-04-29 21:29:47 +05:30
Kovid Goyal
1744a2b2fd
Micro-optimization 2019-04-29 21:27:14 +05:30
Kovid Goyal
05816c2c85
oops 2019-04-29 21:02:31 +05:30
Kovid Goyal
ed2e2e060f
Ensure completion dict for ebook-convert has unicode strings 2019-04-29 20:48:52 +05:30
Eli Schwartz
c29219e193
py3: make completion work
Stop using python2 hack to duplicate python3 print behavior.
2019-04-29 11:04:50 -04:00
Kovid Goyal
61a8db8988
version 3.42.0 2019-04-29 14:13:23 +05:30
Kovid Goyal
1fe67d919b
Merge branch 'py3' of https://github.com/eli-schwartz/calibre 2019-04-29 13:10:22 +05:30
Eli Schwartz
c478c978ef
py3: make rb metadata reading work 2019-04-29 02:03:57 -04:00
Eli Schwartz
42cb67abb3
py3: make rb input work 2019-04-29 02:03:50 -04:00
Eli Schwartz
f2009fd991
py3: make rb output work 2019-04-29 02:03:50 -04:00
Kovid Goyal
336d4054d1
DOCX Input: Fix cross-references using the "fldSimple" markup not being recognized by calibre.
Apparently some software in some circumstances generate field
using fldSimple rather than instrText. fldSimple is in the spec, so add
support for it to calibre's DOCX engine.
2019-04-29 10:15:21 +05:30
Kovid Goyal
97b20f38f5
Fix #1822018 [Does not auto-convert when adding existing book with overwrite selected](https://bugs.launchpad.net/calibre/+bug/1822018) 2019-04-28 18:25:52 +05:30
Kovid Goyal
5b3376c3f5
py3: Ensure cssText is of well-known type 2019-04-28 15:10:18 +05:30
Kovid Goyal
e99c7fd296
Conversion: Transform styles: When using regular expressions fix substitution groups not working
Fixes #1825764 [Problem with regex Pattern Matching in Transform Style](https://bugs.launchpad.net/calibre/+bug/1825764)
2019-04-28 14:13:43 +05:30
Kovid Goyal
fda49f12d5
py3: Fix transform css test dialog 2019-04-28 14:07:46 +05:30
Kovid Goyal
8ea5ddbbaa
Fix a regression in the previous release that caused the conversion of HTML to text in comments when output to catalogs or converting downloaded metadata to behave slightly differently. Fixes #1826654 [Comments in CSV-Catalog](https://bugs.launchpad.net/calibre/+bug/1826654) 2019-04-28 12:51:32 +05:30
Kovid Goyal
ddbda87137
py3: more hashlib fixes 2019-04-28 12:03:47 +05:30
Kovid Goyal
74c3bfa9fe
py3 fix OPDS feed generation 2019-04-28 11:48:32 +05:30
Kovid Goyal
59271d0bc2
Edit book: Fix beautify not handling <colgroup> and <th> tags correctly. Fixes #1826631 [Beautify does not work with colgroup](https://bugs.launchpad.net/calibre/+bug/1826631) 2019-04-27 14:15:50 +05:30
Kovid Goyal
9d268ed2c9
EPUB/MOBI Catalogs: Fix a regression in the previous release that caused ampersands and middle-dots to appear as HTML entities in the output. Fixes #1826127 [special signs are ignored in catalog](https://bugs.launchpad.net/calibre/+bug/1826127)
BS 4 now auto-escape unsafe characters in HTML when creating markup. So
get rid of the explicit escaping code and use unicode symbols instead of
entities everywhere.
2019-04-27 13:17:10 +05:30
Kovid Goyal
ea5b6da55a
Get rid of workaround for people running from source with obsolete binaries 2019-04-27 13:15:24 +05:30
Kovid Goyal
18fd3ae063
Amazon metadata: Make title processing more robust
Also make it easier to run tests selectively from the command line
2019-04-27 12:05:24 +05:30
Kovid Goyal
2983cb20e9
Fix #1826619 [GMX email setup instructions enhancement](https://bugs.launchpad.net/calibre/+bug/1826619) 2019-04-27 08:12:38 +05:30
Eli Schwartz
2663085c55
py3: don't unpack dict before passing it to new defaultdict constructor
This was never needed, but it breaks on python3 since e.g. None cannot
be a keyword. defaultdict can just accept the dict itself, though.
2019-04-25 03:32:21 -04:00
Eli Schwartz
99cb0c4417
py3: make conversion in the GUI work 2019-04-25 03:01:15 -04:00