1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-26 18:10:30 +00:00

Merge branch 'master' into Develop

# Conflicts:
#	cps/web.py
#	test/Calibre-Web TestSummary_Linux.html
This commit is contained in:
Ozzie Isaacs 2023-02-21 17:03:54 +01:00
commit b28a2cc58c
4 changed files with 15 additions and 8 deletions

View File

@ -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 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` 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). 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 ## Quick start

View File

@ -149,7 +149,7 @@ class TaskBackupMetadata(CalibreTask):
package.set("unique-identifier", "uuid_id") package.set("unique-identifier", "uuid_id")
package.set("version", "2.0") package.set("version", "2.0")
# generate metadata element and all subelements of it # generate metadata element and all sub elements of it
metadata = etree.SubElement(package, "metadata", nsmap=NSMAP) metadata = etree.SubElement(package, "metadata", nsmap=NSMAP)
identifier = etree.SubElement(metadata, PURL + "identifier", id="calibre_id", nsmap=NSMAP) identifier = etree.SubElement(metadata, PURL + "identifier", id="calibre_id", nsmap=NSMAP)
identifier.set(OPF + "scheme", "calibre") identifier.set(OPF + "scheme", "calibre")

View File

@ -43,16 +43,17 @@
<title>{{entry.Books.title}}</title> <title>{{entry.Books.title}}</title>
<id>urn:uuid:{{entry.Books.uuid}}</id> <id>urn:uuid:{{entry.Books.uuid}}</id>
<updated>{{entry.Books.atom_timestamp}}</updated> <updated>{{entry.Books.atom_timestamp}}</updated>
{% if entry.Books.authors.__len__() > 0 %} {% for author in entry.Books.authors %}
<author> <author>
<name>{{entry.Books.authors[0].name}}</name> <name>{{author.name}}</name>
</author> </author>
{% endif %} {% endfor %}
{% if entry.Books.publishers.__len__() > 0 %} {% if entry.Books.publishers.__len__() > 0 %}
<publisher> <publisher>
<name>{{entry.Books.publishers[0].name}}</name> <name>{{entry.Books.publishers[0].name}}</name>
</publisher> </publisher>
{% endif %} {% endif %}
<published>{{entry.Books.pubdate.strftime("%Y-%m-%dT%H:%M:%S+00:00")}}</published>
{% for lang in entry.Books.languages %} {% for lang in entry.Books.languages %}
<dcterms:language>{{lang.lang_code}}</dcterms:language> <dcterms:language>{{lang.lang_code}}</dcterms:language>
{% endfor %} {% endfor %}

View File

@ -1411,10 +1411,10 @@ def change_profile(kobo_support, local_oauth_check, oauth_status, translations,
current_user.random_books = 0 current_user.random_books = 0
try: try:
if current_user.role_passwd() or current_user.role_admin(): if current_user.role_passwd() or current_user.role_admin():
if to_save.get('password', "") != "": if to_save.get("password", "") != "":
current_user.password = generate_password_hash(valid_password(to_save.get("password", ""))) current_user.password = generate_password_hash(to_save.get("password"))
if to_save.get("eReader_mail", current_user.kindle_mail) != current_user.kindle_mail: if to_save.get("kindle_mail", current_user.kindle_mail) != current_user.kindle_mail:
current_user.kindle_mail = valid_email(to_save.get("eReader_mail")) current_user.kindle_mail = valid_email(to_save.get("kindle_mail"))
new_email = valid_email(to_save.get("email", current_user.email)) new_email = valid_email(to_save.get("email", current_user.email))
if not new_email: if not new_email:
raise Exception(_("Email can't be empty and has to be a valid Email")) raise Exception(_("Email can't be empty and has to be a valid Email"))