diff --git a/README.md b/README.md index d9c50f7f..fb8bcd7f 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Calibre-Web is a web app providing a clean interface for browsing, reading and d 1. To avoid problems with already installed python dependencies, it's recommended to create a virtual environment for Calibre-Web 2. Install Calibre-Web via pip with the command `pip install calibreweb` (Depending on your OS and or distro the command could also be `pip3`). 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-Windows) for details -4. Calibre-Web can be started afterwards by typing `cps` or `python3 -m cps` +4. Calibre-Web can be started afterwards by typing `cps` In the Wiki there are also examples for a [manual installation](https://github.com/janeczku/calibre-web/wiki/Manual-installation) and for installation on [Linux Mint](https://github.com/janeczku/calibre-web/wiki/How-To:Install-Calibre-Web-in-Linux-Mint-19-or-20) diff --git a/cps/services/gmail.py b/cps/services/gmail.py index ff36b308..3a4eab7f 100644 --- a/cps/services/gmail.py +++ b/cps/services/gmail.py @@ -25,7 +25,7 @@ from google.oauth2.credentials import Credentials from datetime import datetime import base64 from flask_babel import gettext as _ -from ..constants import BASE_DIR +from ..constants import CONFIG_DIR from .. import logger @@ -53,11 +53,11 @@ def setup_gmail(token): if creds and creds.expired and creds.refresh_token: creds.refresh(Request()) else: - cred_file = os.path.join(BASE_DIR, 'gmail.json') + cred_file = os.path.join(CONFIG_DIR, 'gmail.json') if not os.path.exists(cred_file): raise Exception(_("Found no valid gmail.json file with OAuth information")) flow = InstalledAppFlow.from_client_secrets_file( - os.path.join(BASE_DIR, 'gmail.json'), SCOPES) + os.path.join(CONFIG_DIR, 'gmail.json'), SCOPES) creds = flow.run_local_server(port=0) user_info = get_user_info(creds) return { diff --git a/cps/templates/author.html b/cps/templates/author.html index 4e48e3f0..251a4348 100644 --- a/cps/templates/author.html +++ b/cps/templates/author.html @@ -52,7 +52,7 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% if loop.last %} (...) {% endif %} @@ -60,7 +60,7 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% endif %} {% endfor %} {% for format in entry.data %} @@ -71,7 +71,7 @@

{% if entry.series.__len__() > 0 %}

- + {{entry.series[0].name}} ({{entry.series_index|formatseriesindex}}) @@ -123,7 +123,7 @@

{% if entry.series.__len__() > 0 %}

- + {{entry.series[0].name}} ({{entry.series_index|formatseriesindex}}) diff --git a/cps/templates/discover.html b/cps/templates/discover.html index b776a344..370b9820 100644 --- a/cps/templates/discover.html +++ b/cps/templates/discover.html @@ -26,7 +26,7 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% if loop.last %} (...) {% endif %} @@ -34,13 +34,13 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% endif %} {% endfor %}

{% if entry.series.__len__() > 0 %}

- + {{entry.series[0].name}} ({{entry.series_index|formatseriesindex}}) diff --git a/cps/templates/index.html b/cps/templates/index.html index 8ab7529e..18ec8adc 100644 --- a/cps/templates/index.html +++ b/cps/templates/index.html @@ -25,7 +25,7 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% if loop.last %} (...) {% endif %} @@ -33,13 +33,13 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% endif %} {% endfor %}

{% if entry.series.__len__() > 0 %}

- + {{entry.series[0].name}} ({{entry.series_index|formatseriesindex}}) @@ -107,7 +107,7 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% if loop.last %} (...) {% endif %} @@ -115,7 +115,7 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% endif %} {% endfor %} {% for format in entry.data %} @@ -126,7 +126,7 @@

{% if entry.series.__len__() > 0 %}

- + {{entry.series[0].name}} ({{entry.series_index|formatseriesindex}}) diff --git a/cps/templates/languages.html b/cps/templates/languages.html index 8331cb94..c83398d5 100644 --- a/cps/templates/languages.html +++ b/cps/templates/languages.html @@ -23,7 +23,7 @@ {% endif %}

{{lang[1]}}
-
{{lang[0].name}}
+
{{lang[0].name}}
{% endfor %} diff --git a/cps/templates/search.html b/cps/templates/search.html index 12966348..6f1963f0 100644 --- a/cps/templates/search.html +++ b/cps/templates/search.html @@ -62,7 +62,7 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% if loop.last %} (...) {% endif %} @@ -70,7 +70,7 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% endif %} {% endfor %} {% for format in entry.Books.data %} @@ -81,7 +81,7 @@

{% if entry.Books.series.__len__() > 0 %}

- + {{entry.Books.series[0].name}} ({{entry.Books.series_index|formatseriesindex}}) diff --git a/cps/templates/shelf.html b/cps/templates/shelf.html index 2813d807..ffb6953b 100644 --- a/cps/templates/shelf.html +++ b/cps/templates/shelf.html @@ -50,7 +50,7 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% if loop.last %} (...) {% endif %} @@ -58,13 +58,13 @@ {% if not loop.first %} & {% endif %} - {{author.name.replace('|',',')|shortentitle(30)}} + {{author.name.replace('|',',')|shortentitle(30)}} {% endif %} {% endfor %}

{% if entry.series.__len__() > 0 %}

- + {{entry.series[0].name}} ({{entry.series_index|formatseriesindex}}) diff --git a/cps/templates/shelfdown.html b/cps/templates/shelfdown.html index 78f00b5e..c800dca7 100644 --- a/cps/templates/shelfdown.html +++ b/cps/templates/shelfdown.html @@ -38,7 +38,7 @@

{{entry.title|shortentitle}}

{% for author in entry.ordered_authors %} - {{author.name.replace('|',',')}} + {{author.name.replace('|',',')}} {% if not loop.last %} & {% endif %} @@ -46,7 +46,7 @@

{% if entry.series.__len__() > 0 %}

- + {{entry.series[0].name}} ({{entry.series_index}})