From 0f3f918153fb1c2bf9e3c89bf1af9aeaba5677d8 Mon Sep 17 00:00:00 2001 From: Thore Schillmann Date: Sun, 22 May 2022 17:40:21 +0000 Subject: [PATCH 1/7] multiple authors and publication date in opds feed --- cps/templates/feed.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cps/templates/feed.xml b/cps/templates/feed.xml index 940fb0da..c1e9f43d 100644 --- a/cps/templates/feed.xml +++ b/cps/templates/feed.xml @@ -43,16 +43,17 @@ {{entry.Books.title}} urn:uuid:{{entry.Books.uuid}} {{entry.Books.atom_timestamp}} - {% if entry.Books.authors.__len__() > 0 %} + {% for author in entry.Books.authors %} - {{entry.Books.authors[0].name}} + {{author.name}} - {% endif %} + {% endfor %} {% if entry.Books.publishers.__len__() > 0 %} {{entry.Books.publishers[0].name}} {% endif %} + {{entry.Books.pubdate}} {% for lang in entry.Books.languages %} {{lang.lang_code}} {% endfor %} From 2816a75c3ec58f8c322f7426a287d64947e607e1 Mon Sep 17 00:00:00 2001 From: Thore Schillmann Date: Thu, 9 Jun 2022 20:35:44 +0000 Subject: [PATCH 2/7] changed datetime format of published tag --- cps/templates/feed.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/templates/feed.xml b/cps/templates/feed.xml index c1e9f43d..d2114157 100644 --- a/cps/templates/feed.xml +++ b/cps/templates/feed.xml @@ -53,7 +53,7 @@ {{entry.Books.publishers[0].name}} {% endif %} - {{entry.Books.pubdate}} + {{entry.Books.pubdate.strftime("%Y-%m-%dT%H:%M:%S+00:00")}} {% for lang in entry.Books.languages %} {{lang.lang_code}} {% endfor %} From 6119eb36817b5cc41b6cec3d24ebbab0653c002b Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 18 Feb 2023 14:34:53 +0100 Subject: [PATCH 3/7] Revert restart change --- cps/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/server.py b/cps/server.py index 14ab0c37..1a25a72e 100644 --- a/cps/server.py +++ b/cps/server.py @@ -266,7 +266,7 @@ class WebServer(object): if os.environ.get('FLASK_DEBUG'): subprocess.run(args, close_fds=True) # nosec else: - subprocess.Popen(args, close_fds=True) # nosec + subprocess.run(args, close_fds=True) # nosec return True @staticmethod From 38c601bb10f14e549bbd88ab0c46b9865756ce91 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 19 Feb 2023 09:10:25 +0100 Subject: [PATCH 4/7] Bugfix server restart to prevent infinite calibre-web instances --- cps/server.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cps/server.py b/cps/server.py index 1a25a72e..15a1ef7b 100644 --- a/cps/server.py +++ b/cps/server.py @@ -194,6 +194,8 @@ class WebServer(object): rv.extend(("-m", py_module.lstrip("."))) rv.extend(args) + if os.name == 'nt': + rv = ['"{}"'.format(a) for a in rv] return rv def _start_gevent(self): @@ -263,10 +265,7 @@ class WebServer(object): log.info("Performing restart of Calibre-Web") args = self._get_args_for_reloading() - if os.environ.get('FLASK_DEBUG'): - subprocess.run(args, close_fds=True) # nosec - else: - subprocess.run(args, close_fds=True) # nosec + os.execv(args[0].lstrip('"').rstrip('"'), args) return True @staticmethod From 0177a8bcca154daf989f061a2a0bc6796c1547e5 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 19 Feb 2023 16:02:19 +0100 Subject: [PATCH 5/7] Update installing problem on Raspberry Pi --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 1f0eca71..5b137f68 100755 --- a/README.md +++ b/README.md @@ -46,6 +46,12 @@ Calibre-Web is a web app providing a clean interface for browsing, reading and d 3. Optional features can also be installed via pip, please refer to [this page](https://github.com/janeczku/calibre-web/wiki/Dependencies-in-Calibre-Web-Linux-and-Windows) for details 4. Calibre-Web can be started afterwards by typing `cps` +Issues with Raspberry Pi - Raspberry Pi OS: +Depending on your version of pip it's possible that the installation fails with `Failed to build cryptography +ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects`. +In this case please try to update pip with `./venv/bin/python3 -m pip install --upgrade pip` first, and then try installing Calibre-Web again. +If this isn't working please also install cargo via `sudo apt install cargo`, and try installing Calibre-Web again. + In the Wiki there are also examples for: a [manual installation](https://github.com/janeczku/calibre-web/wiki/Manual-installation), [installation on Linux Mint](https://github.com/janeczku/calibre-web/wiki/How-To:Install-Calibre-Web-in-Linux-Mint-19-or-20), [installation on a Cloud Provider](https://github.com/janeczku/calibre-web/wiki/How-To:-Install-Calibre-Web-on-a-Cloud-Provider). ## Quick start From 595f01e7a3b408764a4f27387509dce2b3b9813f Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 19 Feb 2023 19:36:52 +0100 Subject: [PATCH 6/7] Bugfix change erader email in /me page --- cps/web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cps/web.py b/cps/web.py index 8445196f..f02ac21e 100644 --- a/cps/web.py +++ b/cps/web.py @@ -1368,8 +1368,8 @@ def change_profile(kobo_support, local_oauth_check, oauth_status, translations, if to_save.get("password"): current_user.password = generate_password_hash(to_save.get("password")) try: - if to_save.get("eReader_mail", current_user.kindle_mail) != current_user.kindle_mail: - current_user.kindle_mail = valid_email(to_save.get("eReader_mail")) + if to_save.get("kindle_mail", current_user.kindle_mail) != current_user.kindle_mail: + current_user.kindle_mail = valid_email(to_save.get("kindle_mail")) new_email = valid_email(to_save.get("email", current_user.email)) if not new_email: raise Exception(_("Email can't be empty and has to be a valid Email")) From 5fd0e4c04691e04952ff170da7365a27cecdc63d Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 20 Feb 2023 18:46:48 +0100 Subject: [PATCH 7/7] Updated testresult --- setup.cfg | 4 +- test/Calibre-Web TestSummary_Linux.html | 168 ++++++++++-------------- 2 files changed, 74 insertions(+), 98 deletions(-) diff --git a/setup.cfg b/setup.cfg index b4c2a522..37dc4809 100644 --- a/setup.cfg +++ b/setup.cfg @@ -62,7 +62,7 @@ install_requires = [options.extras_require] gdrive = - google-api-python-client>=1.7.11,<2.75.0 + google-api-python-client>=1.7.11,<2.78.0 gevent>20.6.0,<23.0.0 greenlet>=0.4.17,<2.1.0 httplib2>=0.9.2,<0.22.0 @@ -75,7 +75,7 @@ gdrive = rsa>=3.4.2,<4.10.0 gmail = google-auth-oauthlib>=0.4.3,<0.9.0 - google-api-python-client>=1.7.11,<2.75.0 + google-api-python-client>=1.7.11,<2.78.0 goodreads = goodreads>=0.3.2,<0.4.0 python-Levenshtein>=0.12.0,<0.21.0 diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 989d480e..4e3ed7ed 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
-

Start Time: 2023-02-10 18:46:27

+

Start Time: 2023-02-19 19:38:02

-

Stop Time: 2023-02-11 01:04:02

+

Stop Time: 2023-02-20 01:56:35

-

Duration: 5h 20 min

+

Duration: 5h 23 min

@@ -726,11 +726,11 @@ - + TestEbookConvertGDriveKepubify 3 - 2 - 1 + 3 + 0 0 0 @@ -749,33 +749,11 @@ - +
TestEbookConvertGDriveKepubify - test_convert_only
- -
- FAIL -
- - - - + PASS @@ -1676,9 +1654,9 @@ AssertionError: 20 != 10 TestEditBooksOnGdrive 18 - 15 + 17 + 0 1 - 2 0 Detail @@ -1786,33 +1764,11 @@ AssertionError: 20 != 10 - +
TestEditBooksOnGdrive - test_edit_language
- -
- ERROR -
- - - - + PASS @@ -1826,31 +1782,11 @@ AttributeError: 'bool' object has no attribute 'send_keys' - +
TestEditBooksOnGdrive - test_edit_rating
- -
- FAIL -
- - - - + PASS @@ -3697,11 +3633,11 @@ AttributeError: 'bool' object has no attribute 'text' - + TestThumbnails 8 - 7 - 0 + 5 + 2 0 1 @@ -3738,11 +3674,31 @@ AttributeError: 'bool' object has no attribute 'text' - +
TestThumbnails - test_cover_change_on_upload_new_cover
- PASS + +
+ FAIL +
+ + + + @@ -3774,11 +3730,31 @@ AttributeError: 'bool' object has no attribute 'text' - +
TestThumbnails - test_sideloaded_book
- PASS + +
+ FAIL +
+ + + + @@ -4853,9 +4829,9 @@ AttributeError: 'bool' object has no attribute 'text' Total 425 - 413 + 414 3 - 2 + 1 7   @@ -4884,7 +4860,7 @@ AttributeError: 'bool' object has no attribute 'text' Platform - Linux 5.19.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 15 12:05:40 UTC 2 x86_64 x86_64 + Linux 5.19.0-32-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2 x86_64 x86_64 Basic @@ -5034,7 +5010,7 @@ AttributeError: 'bool' object has no attribute 'text' google-api-python-client - 2.77.0 + 2.78.0 TestCliGdrivedb @@ -5064,7 +5040,7 @@ AttributeError: 'bool' object has no attribute 'text' google-api-python-client - 2.77.0 + 2.78.0 TestEbookConvertCalibreGDrive @@ -5094,7 +5070,7 @@ AttributeError: 'bool' object has no attribute 'text' google-api-python-client - 2.77.0 + 2.78.0 TestEbookConvertGDriveKepubify @@ -5136,7 +5112,7 @@ AttributeError: 'bool' object has no attribute 'text' google-api-python-client - 2.77.0 + 2.78.0 TestEditAuthorsGdrive @@ -5172,7 +5148,7 @@ AttributeError: 'bool' object has no attribute 'text' google-api-python-client - 2.77.0 + 2.78.0 TestEditBooksOnGdrive @@ -5214,7 +5190,7 @@ AttributeError: 'bool' object has no attribute 'text' google-api-python-client - 2.77.0 + 2.78.0 TestSetupGdrive @@ -5292,7 +5268,7 @@ AttributeError: 'bool' object has no attribute 'text' SQLAlchemy-Utils - 0.39.0 + 0.40.0 TestOAuthLogin @@ -5304,7 +5280,7 @@ AttributeError: 'bool' object has no attribute 'text'