From 4e42a179fadc9f593ddff7c6f42bd4fb1be75fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Heroudek?= Date: Tue, 14 Jan 2020 16:45:45 +0000 Subject: [PATCH 01/17] Update messages.po --- cps/translations/cs/LC_MESSAGES/messages.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cps/translations/cs/LC_MESSAGES/messages.po b/cps/translations/cs/LC_MESSAGES/messages.po index 1670b356..60e6e90d 100644 --- a/cps/translations/cs/LC_MESSAGES/messages.po +++ b/cps/translations/cs/LC_MESSAGES/messages.po @@ -953,7 +953,7 @@ msgstr "Správce" #: cps/templates/detail.html:27 cps/templates/shelf.html:6 #: cps/templates/shelfdown.html:62 msgid "Download" -msgstr "Stáhovat" +msgstr "Stahovat" #: cps/templates/admin.html:18 msgid "View Ebooks" @@ -1665,7 +1665,7 @@ msgstr "Označit jako přečtené" #: cps/templates/detail.html:201 msgid "Read" -msgstr "Číst" +msgstr "Přečteno" #: cps/templates/detail.html:211 msgid "Description:" @@ -2208,7 +2208,7 @@ msgstr "Resetovat uživatelské heslo" #: cps/templates/user_edit.html:26 msgid "Kindle E-Mail" -msgstr "Kindle E-Mail" +msgstr "Kindle e-mail" #: cps/templates/user_edit.html:39 msgid "Show books with language" From 8f4253adbde5911afdb5e9dd7890360b89c217b4 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sat, 18 Jan 2020 10:32:09 +0100 Subject: [PATCH 02/17] Fix for limiting domains (now no restriction to domain only) --- cps/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/helper.py b/cps/helper.py index ff6fbb98..61058f53 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -700,7 +700,7 @@ def speaking_language(languages=None): # example SELECT * FROM @TABLE WHERE 'abcdefg' LIKE Name; # from https://code.luasoftware.com/tutorials/flask/execute-raw-sql-in-flask-sqlalchemy/ def check_valid_domain(domain_text): - domain_text = domain_text.split('@', 1)[-1].lower() + # domain_text = domain_text.split('@', 1)[-1].lower() sql = "SELECT * FROM registration WHERE (:domain LIKE domain and allow = 1);" result = ub.session.query(ub.Registration).from_statement(text(sql)).params(domain=domain_text).all() if not len(result): From 4406220f7073be59895ecb5f25c567f5130fe4cf Mon Sep 17 00:00:00 2001 From: Jony <23194385+jony0008@users.noreply.github.com> Date: Sat, 18 Jan 2020 11:25:07 +0100 Subject: [PATCH 03/17] Update Swedish translation Update file --- cps/translations/sv/LC_MESSAGES/messages.po | 44 ++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/cps/translations/sv/LC_MESSAGES/messages.po b/cps/translations/sv/LC_MESSAGES/messages.po index d89fc8f9..5ac5a0fc 100644 --- a/cps/translations/sv/LC_MESSAGES/messages.po +++ b/cps/translations/sv/LC_MESSAGES/messages.po @@ -5,18 +5,19 @@ # FIRST AUTHOR OzzieIsaacs, 2016. msgid "" msgstr "" -"Project-Id-Version: Calibre-Web\n" +"Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" "POT-Creation-Date: 2020-01-12 13:57+0100\n" -"PO-Revision-Date: 2019-11-14 18:50+0100\n" +"PO-Revision-Date: 2020-01-18 11:22+0100\n" "Last-Translator: Jonatan Nyberg \n" "Language: sv\n" "Language-Team: \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.7.0\n" +"X-Generator: Poedit 2.2.4\n" #: cps/about.py:42 msgid "installed" @@ -98,7 +99,7 @@ msgstr "Det gick inte att skicka Testmeddelandet: %(res)s" #: cps/admin.py:540 msgid "Please configure your e-mail address first..." -msgstr "" +msgstr "Vänligen konfigurera din e-postadress först..." #: cps/admin.py:542 msgid "E-mail server settings updated" @@ -124,7 +125,7 @@ msgstr "Redigera användaren %(nick)s" #: cps/admin.py:622 cps/web.py:1327 msgid "This username is already taken" -msgstr "" +msgstr "Detta användarnamn är redan taget" #: cps/admin.py:637 #, python-format @@ -260,11 +261,11 @@ msgstr "Det gick inte att redigera boken, kontrollera loggfilen för mer informa #: cps/editbooks.py:581 #, python-format msgid "File %(filename)s could not saved to temp dir" -msgstr "" +msgstr "Filen %(filename)s kunde inte sparas i temp dir" #: cps/editbooks.py:598 msgid "Uploaded book probably exists in the library, consider to change before upload new: " -msgstr "" +msgstr "Uppladdad bok finns förmodligen i biblioteket, överväg att ändra innan du laddar upp nya: " #: cps/editbooks.py:613 #, python-format @@ -833,7 +834,7 @@ msgstr "Konfigurera din kindle-e-postadress först..." #: cps/web.py:1087 msgid "E-Mail server is not configured, please contact your administrator!" -msgstr "" +msgstr "E-postservern är inte konfigurerad, kontakta din administratör!" #: cps/web.py:1088 cps/web.py:1094 cps/web.py:1119 cps/web.py:1123 #: cps/web.py:1128 cps/web.py:1132 @@ -871,11 +872,11 @@ msgstr "Fel användarnamn eller lösenord" #: cps/web.py:1170 msgid "New Password was send to your email address" -msgstr "" +msgstr "Nytt lösenord skickades till din e-postadress" #: cps/web.py:1176 msgid "Please enter valid username to reset password" -msgstr "" +msgstr "Ange giltigt användarnamn för att återställa lösenordet" #: cps/web.py:1182 #, python-format @@ -1034,11 +1035,11 @@ msgstr "Fjärrinloggning" #: cps/templates/admin.html:104 msgid "Reverse proxy login" -msgstr "" +msgstr "Omvänd proxy inloggning" #: cps/templates/admin.html:109 msgid "Reverse proxy header name" -msgstr "" +msgstr "Omvänt proxy rubriknamn" #: cps/templates/admin.html:121 msgid "Administration" @@ -1505,11 +1506,11 @@ msgstr "%(provider)s OAuth-klient-hemlighet" #: cps/templates/config_edit.html:276 msgid "Allow Reverse Proxy Authentication" -msgstr "" +msgstr "Tillåt omvänd proxyautentisering" #: cps/templates/config_edit.html:280 msgid "Reverse Proxy Header Name" -msgstr "" +msgstr "Omvänt proxy rubriknamn" #: cps/templates/config_edit.html:292 msgid "External binaries" @@ -1734,7 +1735,7 @@ msgstr "Ange domännamn" #: cps/templates/email_edit.html:60 msgid "Denied domains for registering" -msgstr "" +msgstr "Nekade domäner för registrering" #: cps/templates/email_edit.html:90 msgid "Do you really want to delete this domain rule?" @@ -1774,7 +1775,7 @@ msgstr "Populära publikationer från den här katalogen baserad på betyg." #: cps/templates/index.xml:31 msgid "Recently added Books" -msgstr "" +msgstr "Senaste tillagda böcker" #: cps/templates/index.xml:35 msgid "The latest Books" @@ -1802,11 +1803,11 @@ msgstr "Böcker ordnade efter serier" #: cps/templates/index.xml:93 msgid "Books ordered by Languages" -msgstr "" +msgstr "Böcker ordnade efter språk" #: cps/templates/index.xml:100 msgid "Books ordered by file formats" -msgstr "" +msgstr "Böcker ordnade av filformat" #: cps/templates/index.xml:103 cps/templates/layout.html:137 msgid "Public Shelves" @@ -1905,7 +1906,7 @@ msgstr "Kom ihåg mig" #: cps/templates/login.html:22 msgid "Forgot password" -msgstr "" +msgstr "Glömt lösenord" #: cps/templates/login.html:25 msgid "Log in with magic link" @@ -2093,11 +2094,11 @@ msgstr "Uteslut språk" #: cps/templates/search_form.html:95 msgid "Extensions" -msgstr "" +msgstr "Tillägg" #: cps/templates/search_form.html:105 msgid "Exclude Extensions" -msgstr "" +msgstr "Uteslut tillägg" #: cps/templates/search_form.html:117 msgid "Rating bigger than" @@ -2457,4 +2458,3 @@ msgstr "Senaste hämtningar" #~ msgid "New Books" #~ msgstr "Nya böcker" - From 05a35be0196f8338cf576ecac9ff40a6295053aa Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Sat, 18 Jan 2020 11:53:23 +0100 Subject: [PATCH 04/17] Update test result --- README.md | 4 +- test/Calibre-Web TestSummary.html | 563 +++++++----------------------- 2 files changed, 123 insertions(+), 444 deletions(-) diff --git a/README.md b/README.md index d81e7ece..a3e05cd3 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Calibre-Web is a web app providing a clean interface for browsing, reading and d ## Quick start -1. Install dependencies by running `pip install --target vendor -r requirements.txt`. +1. Install dependencies by running `pip3 install --target vendor -r requirements.txt`. 2. Execute the command: `python cps.py` (or `nohup python cps.py` - recommended if you want to exit the terminal window) 3. Point your browser to `http://localhost:8083` or `http://localhost:8083/opds` for the OPDS catalog 4. Set `Location of Calibre database` to the path of the folder where your Calibre library (metadata.db) lives, push "submit" button\ @@ -46,7 +46,7 @@ Please note that running the above install command can fail on some versions of ## Requirements -Python 2.7+, python 3.x+ +python 3.x+, (Python 2.7+) Optionally, to enable on-the-fly conversion from one ebook format to another when using the send-to-kindle feature, or during editing of ebooks metadata: diff --git a/test/Calibre-Web TestSummary.html b/test/Calibre-Web TestSummary.html index 51db76cb..61cc0c49 100644 --- a/test/Calibre-Web TestSummary.html +++ b/test/Calibre-Web TestSummary.html @@ -30,15 +30,15 @@
-

Start Time: 2019-12-29 09:32:57.266265

+

Start Time: 2020-01-18 11:05:44.056481

-

Stop Time: 2019-12-29 10:08:09.098085

+

Stop Time: 2020-01-18 11:39:51.113755

-

Duration: 0:35:11.831820

+

Duration: 0:34:07.057274

@@ -276,12 +276,12 @@
pt3.4: User: name@host.com, Password: 10234
-Receiving message from: ('127.0.0.1', 44766)
+Receiving message from: ('127.0.0.1', 59864)
 Message addressed from: name@host.com
 Message addressed to: a5@b.com
 Message length        : 42
 User: name@host.com, Password: 10234
-Receiving message from: ('127.0.0.1', 44768)
+Receiving message from: ('127.0.0.1', 59866)
 Message addressed from: name@host.com
 Message addressed to: a1@b.com
 Message length        : 16679
@@ -309,7 +309,7 @@ User: name@host.com, Password: 1234
pt3.5: User: name@host.com, Password: 10234
-Receiving message from: ('127.0.0.1', 44772)
+Receiving message from: ('127.0.0.1', 59870)
 Message addressed from: name@host.com
 Message addressed to: a5@b.com
 Message length        : 42
@@ -355,7 +355,7 @@ User: name@host.com, Password: 1234
pt3.9: User: name@host.com, Password: 10234
-Receiving message from: ('127.0.0.1', 44776)
+Receiving message from: ('127.0.0.1', 59880)
 Message addressed from: name@host.com
 Message addressed to: a1@b.com
 Message length        : 22311
@@ -382,12 +382,12 @@ Message length : 22311
pt3.10: User: name@host.com, Password: 10234
-Receiving message from: ('127.0.0.1', 44778)
+Receiving message from: ('127.0.0.1', 59882)
 Message addressed from: name@host.com
 Message addressed to: a5@b.com
 Message length        : 42
 User: name@host.com, Password: 10234
-Receiving message from: ('127.0.0.1', 44780)
+Receiving message from: ('127.0.0.1', 59884)
 Message addressed from: name@host.com
 Message addressed to: a1@b.com
 Message length        : 17477
@@ -1284,7 +1284,7 @@ Message length : 17477
pt6.1: User: name@host.com, Password: 10234
-Receiving message from: ('127.0.0.1', 47328)
+Receiving message from: ('127.0.0.1', 36128)
 Message addressed from: name@host.com
 Message addressed to: a1@b.com
 Message length        : 22013
@@ -1300,62 +1300,28 @@ Message length : 22013 PASS - + test_email_ssl.test_SSL 4 - 2 + 4 + 0 0 0 - 2 Detail - +
test_SSL_None_setup_error
- -
- SKIP -
- - - - + PASS - +
test_SSL_STARTTLS_setup_error
- -
- SKIP -
- - - - + PASS @@ -1374,7 +1340,7 @@ Message length : 22013
pt7.3: User: name@host.com, Password: 10234
-Receiving message from: ('127.0.0.1', 38658)
+Receiving message from: ('127.0.0.1', 54936)
 Message addressed from: name@host.com
 Message addressed to: a5@b.com
 Message length        : 42
@@ -1401,7 +1367,7 @@ Message length : 42
pt7.4: User: name@host.com, Password: 10234
-Receiving message from: ('127.0.0.1', 38660)
+Receiving message from: ('127.0.0.1', 54938)
 Message addressed from: name@host.com
 Message addressed to: a1@b.com
 Message length        : 22013
@@ -1976,34 +1942,38 @@ AssertionError: False is not true : logfile config value is not empty after rese - + test_register.test_register - 5 - 4 + 6 + 6 + 0 0 0 - 1 - Detail + Detail - + -
test_limit_domain
+
test_forgot_password
- SKIP + PASS
-