-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Python is a very modular programming language, special funcionality can be included to the program by "importing moduls". If one of this modules isn't found you get the error message 'ImportError: No module named xxxx'. This shouldn't be happen, you normally can solve this by installing the missing module with pip[3] --target vendor install [module-name]
. Pip3 is normally used if you are using python 3.x if you are still using python 2.x normally pip does the job.
If there are more than on admin on your instance any other admin can generate a new password for your account. If the only admin forgot his password: You are in trouble. Currently no password reset function is implemented The only option would be editing the password in the app.db with a sqlite Databaseeditor, or starting from the beginning.
All settings of Calibre-Web are stored in the app.db in the root folder of the project.If you are using Google Drive as ebook storage than you also need to backup the gdrive.db, settings.yaml and gdrive_credentials files.
I have succesfully tested the following OPDS-Reader:
-
Chunky on iOS (mainly for comics)
-
Marvin and Marvin3 on iOS
-
Calibre-companion on Android (Book downloads viewing book details are also supported with this reader even it's not using the standard opds features). Download is only working with anonymous browsing enabled
-
Kybook 1/2/3 on iOS
-
Megareader on iOS (download seems not to work)
-
moon+ on Android (Cover pictures are only displayed with anonymous browsing enabled, tested with v4.5.7)
-
ebookdroid on Android (Download is only working with anonymous browsing enabled, tested with v2.6.3)
-
Coolreader on Android (Cover pictures are not supported, tested with v3.2.29-1)
-
FBReader on Android (Cover pictures are only displayed with anonymous browsing enabled, tested with v3.0.8)
-
Koreader on Kobo (https://github.com/koreader/koreader) has a compatible OPDS browser.
I'm not using all the reader regular, so issues might appear from time to time. If it's reported I'll try to fix it.
Why is my epub xxx.epub not working in the reader? Calibre-web uses the futurepress-javascript-epub-reader library to display epubs. Unfortunaly some ebooks aren't fully specification compliant, and the epub-reader library has it's own limitations and errors, so from time to time certain ebook aren't displayable by Calibre-web.
Virtual libraries are implemented as searches in Calibre's own searching language. Supporting this would mean a complete reimplementation of Calibre's searching functions, which is a bit out of my time and Calibre-web's feature scope.
Calibre-web default server ('tornado') limits the uploaded file size to 200MB, 'Gevent' the server from the optional requirement has no hardcoded limit (or nothing I'm aware of)
If you just organize your epubs with calibre-web, the content of the epub is not touched, and nothing gets to excecution.
If you use the included epub-reader, it is a different story:
Calibre-web unpacks the epub (which are normal zip files) to a folder on the server which is accessible by the browser. Then calibre-web sends the reader page to the browser. The browser starts the epub-reader JavaScript file, which itself starts to build up the webpage you see. During that process, the file contents of the epub file is loaded into the browser. The content is just normal html pages, which can include stylesheet files and JavaScript files. So if there is malicious code included the epub, or links to JavaScript code the browser (if not prevented anyhow) will start to interpret it.
If you are not sure, you could rename the epub to zip open it and search for js-code and delete it, and afterwards rename t to epub again. Also tools like the Sigil Epub Editor could help to dig deeper into the suspicious books.
Symptom: Calibre-Web logs a message like: WARNING - PDF extraction forbidden by ImageMagick policy: not authorized '/tmp/calibre_web/xxxxxxxxxxxxxxxxxx' @ error/constitute.c/ReadImage/412
during upload of PDF files.
ImageMagick recently changed their security policy, they now deny per default PDF operations, so covers can't be extracted anymore, you have to allow it in the policy.xml file of ImageMagick (located in /etc/Imagemagick-6) by changing line:
<policy domain="coder" rights="none" pattern="PDF" />
to
<policy domain="coder" rights="read" pattern="PDF" />
Calibre-Web has to be restarted after changing the policy.xml file. Covers should be extracted without error from uploaded PDF files.
It's possible to upload several books at once by selecting more than one file. The limitation is the upload size of the calibre-web interal server (several hundred megabyte). Another posibility is via a normal shall script by watching a folder content. Prerequisites for the example below is a installed calibre program. The script has to be called regulary (cron job). The script watches for content in the supervised path, calls calibre to add the files in the folder to the library and deletes the files in the last step from the source folder.
#!/bin/bash
if [ "$(ls -A [folder to watch] )" ]; then
calibredb add -r "[folder to watch]" --library-path="[path to calibre library]"
rm [folder to watch]/*
fi
Kobo readers having problems using the internal web browser on non standard ports, means with the calibre-web standard port the magic login link normally doesn't work. As workaround calibre-web could be accessed via reverse proxy, or using the normal login method.
Non ASCII Filenames, including author names (containing korean, chinese, ... characters) are changed to a transliterated representation. This is an exact copy of the behavior of calibre.
I case you entered invalid key files for accessing calibre-web through https, the ssl configuration can be overridden using the commandline arguments "-c" and "-k". The file locations can than be corrected in the web-UI.
Shelfs can be filled book by book on the corresponding detail page. Books can be massadded from the result of an adavned search. Third option for adding many books at one time to a shelf is using a script like the cps-mass-adder script. The order of books in a shelf can be rearranged on the shelf edit page via drag 'n drop.
In a one user use case you can use the guest account for sending ebooks to kindle. Please add in this case a kindle-email to the guest account, afterwards the "send to kindle" button appears for the guest user. If more than one user is accessing the guest account this is not working, as you can only have one kindle-email linked to a user.
If the calibre-web repro is cloned via git and certain git setting are set (line endings conversion), this could cause this error. The cause is that the line endings in the file cps/translations/iso639.pickle are converted to "windows" endings. To solve the problem, please replace the file with the version from:
https://raw.githubusercontent.com/janeczku/calibre-web/master/cps/translations/iso639.pickle\
or
open the file with a advanced editor like notepad++ and change the line endings to Unix -> only LF.
In a single user Calibre installation you can use a boolean custom column to keep track of your read and unread books. Calobre-web can do the following. You can link the Calibre status to the read/unread status in Calibre-Web. As mentioned above this only works in a SINGLE USER use-case. If you are having more than one user in Calibre-Web this will cause trouble, because the read/unread status is than used for all users, so if one user ticks a book as read, all users will see this book as read. In a multiuser Calibre-Web use case it's absolutly manatory not to use this feature.
How to use the feature?
- Open Calibre (the Desktop program) and create a boolean custom column name it accordingly (e.g. Read Status)
- Calibre will ask you for a restart to apply the change. Afterewards please close Calibre
- For safety reasons it's recommended to restart Calibre-Web
- Log in to Calibre-Web as admin and go to Admin->UI configuration->View Configuration
- The field "Link read/unread status to Calibre column" should now offer a selection of all boolean custom columns of the corresponding Calibre library, select the appropriate entry and save The read/unread status is now identical in Calibre and Calibre-Web
The recommended way for handling mulitple libraries is to start multiple instances of calibre-web. Instead of having several copies of the calibre-web code, command line options can be used for this. First start calibre-web with the normal command:
python3 [path to calibre-web]/cps.py
Configure the path to the metadata.db, set the logfile to a new filename (e.g. instance1.log) and change the port to e.g. 8084. Now stop calibre-web rename the newly generated app.db to e.g. instance1.db. Repeat this procedure for every instance you want to run. At the end start all instance with the commandline-parameter -p:
nohup python3 [path to calibre-web]cps.py -p /[path to calibre-web]instance1.db
nohup python3 [path to calibre-web]cps.py -p /[path to calibre-web]instance2.db
...
nohup python3 [path to calibre-web]cps.py -p /[path to calibre-web]instanceN.db
The command nohup puts the command to the background, so all instances can be started at once. Another option would be using several terminal windows. The final solution would be creating different service files for the different instances. All instances will be accessable afterwards with different port adresses like:
127.0.0.1:8084 for instance1, 127.0.0.1:8085 for instance2 and so on. This procedure can also be used for windows with the usual adoptions (command console/batch programm instead of terminal, task planer instead of service script).
All Calibre-Web data is stored in the app.db file. For google drive additional settings are stored in the gdrive.db, settings.yaml, gdrive_credentials and client_secrets.json. It's sufficent to backup this files to keep the settings. The calibre database has to be backuped seperatly.