Make Kobo optional

move jsonschema dependency to optional-requirements.txt
Added version of jsonschema to about section
Added additional column to RemoteAuthToken table
Update configuration of Kobo sync protocol
This commit is contained in:
Ozzieisaacs
2020-01-11 19:10:39 +01:00
parent 2798dd5916
commit 79a9ef4859
14 changed files with 321 additions and 163 deletions

14
cps.py
View File

@@ -41,8 +41,13 @@ from cps.shelf import shelf
from cps.admin import admi
from cps.gdrive import gdrive
from cps.editbooks import editbook
from cps.kobo import kobo
from cps.kobo_auth import kobo_auth
try:
from cps.kobo import kobo
from cps.kobo_auth import kobo_auth
kobo_available = True
except ImportError:
kobo_available = False
try:
from cps.oauth_bb import oauth
@@ -61,8 +66,9 @@ def main():
app.register_blueprint(admi)
app.register_blueprint(gdrive)
app.register_blueprint(editbook)
app.register_blueprint(kobo)
app.register_blueprint(kobo_auth)
if kobo_available:
app.register_blueprint(kobo)
app.register_blueprint(kobo_auth)
if oauth_available:
app.register_blueprint(oauth)
success = web_server.start()