Commit Graph

37513 Commits

Author SHA1 Message Date
Kovid Goyal 2fc337d779 Dont use str(soup) 2019-03-24 13:36:45 +05:30
Kovid Goyal 19d4a453e8 ... 2019-03-24 13:23:43 +05:30
Kovid Goyal 296eda53ea Do not use BeautifulSoup to read HTML tocs 2019-03-24 13:15:50 +05:30
Kovid Goyal a3c0ce3b24 Do not use BeautifulSoup to postprocess the jacket
Avoids an extra parse
2019-03-24 12:41:40 +05:30
Kovid Goyal 8813a31a38 Handle direct querying of class attribute across BS versions 2019-03-24 12:18:43 +05:30
Kovid Goyal 3045dc3c71 Port use of BeautifulSoup in LRF output 2019-03-24 12:18:42 +05:30
Kovid Goyal c8f94a552b Get rid of soupparser as bs4 has no parser of its own 2019-03-24 12:18:42 +05:30
Kovid Goyal 256c7563b6 Port use of renderContents and BeautifulStoneSoup 2019-03-24 12:18:42 +05:30
Kovid Goyal c89b656df4 Port usage of BeautifulSoup Tag constructor 2019-03-24 12:18:42 +05:30
Kovid Goyal 692230147c Start work on porting to beautifulsoup4 2019-03-24 12:18:42 +05:30
Kovid Goyal 78b7112012 Fix using --insert-metadata with ebook-convert not inserting the title and author metadata from the source document 2019-03-24 12:17:21 +05:30
Kovid Goyal c68a5c8ab1 Port Tag creation in recipes to work with any version of BeautifulSoup 2019-03-23 08:06:25 +05:30
Kovid Goyal 930624d2be pep8 2019-03-22 23:48:01 +05:30
Kovid Goyal 5755625d1e Get rid of has_key from all recipes 2019-03-22 23:47:49 +05:30
Kovid Goyal 3c86c9be6f pep8 2019-03-21 20:40:28 +05:30
Kovid Goyal df0e052c08 Update 1843 2019-03-21 20:33:52 +05:30
Kovid Goyal 47ed2df137 Various fixes for the latest py3 commit 2019-03-21 18:33:19 +05:30
Kovid Goyal 9f31662571 Merge branch 'py3' of https://github.com/eli-schwartz/calibre 2019-03-21 18:15:34 +05:30
Eli Schwartz d66fdc2df7 autopep8 2019-03-21 01:27:21 -04:00
Eli Schwartz cb85e778d8 python3: fix various uses of itertools.i(map|zip)
Use the existing polyglot.builtins / future_builtins versions.
Also smooth over izip_longest, but don't bother with another polyglot
module for one function used in two places.
2019-03-21 01:27:21 -04:00
Eli Schwartz 45f68f552b python3: make coffee build
add polyglot.socketserver wrapper and fix BaseHTTPServer.HTTPServer
2019-03-21 01:27:21 -04:00
Eli Schwartz c940d9941a python3: make kakasi build
Since these are all being opened as non-binary, it makes no sense to
then immediately decode them.
2019-03-21 00:23:43 -04:00
Eli Schwartz 8aceae428e py3: make setup.py gui work
Apparently compileUi explicitly opens the file/buffer as unicode, not
bytes, and then writes a unicode header string (containing the source
file). So the previous attempt to use BytesIO was wrong in this case.

Also images.qrc is being constructed completely in the right here and
now from a bunch of unicode strings, so just use exactly that.
2019-03-20 23:56:30 -04:00
Eli Schwartz 8e125b56a0 python3: listify the range() generator before appending to it
We explicitly need a list here.
2019-03-20 23:56:30 -04:00
Kovid Goyal 9386839320 Various ixes for the previous polyglot commit 2019-03-20 21:11:45 +05:30
Kovid Goyal 1ea8b07078 Merge branch 'py3' of https://github.com/eli-schwartz/calibre 2019-03-20 20:08:13 +05:30
Eli Schwartz e828a4bd98 python3: more use of unicode_type
These metadata sources files are part of the infrastructure, not the
parts which are downloaded.
2019-03-20 08:44:26 -04:00
Eli Schwartz 83b055122a python3: add polyglot.queue wrapper 2019-03-20 08:44:23 -04:00
Eli Schwartz ea6a210e70 python3: wire up more code to polyglot.http_server 2019-03-20 08:43:58 -04:00
Eli Schwartz 8594f52fe8 python3: add more urllib wrappers 2019-03-20 08:43:54 -04:00
Eli Schwartz 1653c790db remove dead code
Initially added in commit c1ef643b8e but I
cannot tell what it was ever used for.
2019-03-20 08:43:22 -04:00
Eli Schwartz 2d382274cd py3: gettext no longer has a unicode= argument
This is unicode by default "since there's no point in translating to
byte strings." Good riddance.
2019-03-20 08:43:22 -04:00
Kovid Goyal 042d740593 ... 2019-03-20 15:02:31 +05:30
Kovid Goyal ae735b2ea3 De-vendor html2text 2019-03-20 14:42:46 +05:30
Kovid Goyal 40a12c31c1 Remove unused code 2019-03-20 10:41:19 +05:30
Kovid Goyal d02a6ea36a Remove unused code 2019-03-19 18:00:20 +05:30
Kovid Goyal c4d30dd75f Misc fixes for the cStriongIO -> io commit 2019-03-19 17:58:16 +05:30
Kovid Goyal 0801ce96a5 Merge branch 'stringio' of https://github.com/eli-schwartz/calibre 2019-03-19 17:55:38 +05:30
Kovid Goyal ac5f1e9039 ... 2019-03-19 12:35:12 +05:30
Kovid Goyal f760326ed2 Fix #1820549 [Ampersand is not escaped from strings on right-click menu](https://bugs.launchpad.net/calibre/+bug/1820549) 2019-03-19 12:21:22 +05:30
Kovid Goyal 14e4682f29 Fix #1820548 [Backups backtrace](https://bugs.launchpad.net/calibre/+bug/1820548) 2019-03-18 07:34:36 +05:30
Kovid Goyal 651344027c Nicer error message if the progress_indicator plugin fails to load 2019-03-17 20:18:06 +05:30
Kovid Goyal dc4c444a71 Handle passing str to json_loads 2019-03-17 20:07:22 +05:30
Kovid Goyal 7d7731f5d0 ... 2019-03-17 19:46:58 +05:30
Eli Schwartz c1fb63378f python3: migrate lots of code to io.(Bytes|String)IO instead of c?StringIO
This is the only IO representation on python3, and it is backported to
python2 to aid in porting but requires determining whether to handle
bytes or unicode...  which is sort of the point of porting, so let's
handle this properly everywhere we can.
2019-03-17 09:15:02 -04:00
Eli Schwartz 0b252e8659 palmdoc: consistently use bytes when writing to the buffer 2019-03-17 09:15:02 -04:00
Eli Schwartz e02f836bd0 lit reader: consistently use bytes when writing to the buffer 2019-03-17 09:15:02 -04:00
Eli Schwartz e37cf6ab3c Update PyRSS2Gen to 1.1
Pull functional changes adapted to in-tree calibre cleanups. Upstream
officially supports python3 so this should be all that is needed.
2019-03-17 09:15:02 -04:00
Eli Schwartz 9505fdf226 Remove ancient db migration code.
The last caller for this function was removed in 2012.
This gets rid of a python2-specific cStringIO import.
2019-03-17 09:15:02 -04:00
Kovid Goyal 86c1d17474 Migrate .pickle config files to JSON format on first read 2019-03-17 18:37:12 +05:30