Calibre-Web is a web app that offers a clean and intuitive interface for browsing, reading, and downloading eBooks using a valid Calibre database.
Table of Contents (click to expand)
This software is a fork of library and licensed under the GPL v3 License.
- Modern and responsive Bootstrap 3 HTML5 interface
- Full graphical setup
- Comprehensive user management with fine-grained per-user permissions
- Admin interface
- Multilingual user interface supporting 20+ languages (supported languages)
- OPDS feed for eBook reader apps
- Advanced search and filtering options
- Custom book collection (shelves) creation
- eBook metadata editing and deletion support
- Metadata download from various sources (extensible via plugins)
- eBook conversion through Calibre binaries
- eBook download restriction to logged-in users
- Public user registration support
- Send eBooks to E-Readers with a single click
- Sync Kobo devices with your Calibre library
- In-browser eBook reading support for multiple formats
- Upload new books in various formats, including audio formats
- Calibre Custom Columns support
- Content hiding based on categories and Custom Column content per user
- Self-update capability
- "Magic Link" login for easy access on eReaders
- LDAP, Google/GitHub OAuth, and proxy authentication support
-
NEW Install Instructions for IIAB Calibre-Web:
https://github.com/iiab/calibre-web/wiki#wrench-installation
-
Technical Background explaining Calibre-Web on Internet-in-a-Box (IIAB) :
https://github.com/iiab/iiab/blob/master/roles/calibre-web/README.rst
- Create a virtual environment: It’s essential to isolate your Calibre-Web installation to avoid dependency conflicts. You can create a virtual environment by running:
python3 -m venv calibre-web-env
- Activate the virtual environment:
source calibre-web-env/bin/activate
- Install Calibre-Web: Use pip to install the application:
pip install calibreweb
- Install optional features: For additional functionality, you may need to install optional features. Refer to this page for details on what can be installed.
- Start Calibre-Web: After installation, you can start the application with:
cps
Note: Users of Raspberry Pi OS may encounter installation issues. If you do, try upgrading pip and/or installing cargo as follows:
./venv/bin/python3 -m pip install --upgrade pip
sudo apt install cargo
- For additional installation examples, check the following:
- Read the NEW Install Instructions above for IIAB Calibre-Web!
Access Calibre-Web: Open your browser and navigate to:http://localhost:8083
or for the OPDS catalog:http://localhost:8083/opds
- Log in: Use the default admin credentials:
- Username: Admin
- Password: changeme
- Database Setup: If you do not have a Calibre database, download a sample from:
Move it out of the Calibre-Web folder to avoid overwriting during updates.
https://github.com/janeczku/calibre-web/raw/master/library/metadata.db
- Configure Calibre Database: In the admin interface, set the
Location of Calibre database
to the path of the folder containing your Calibre library (wheremetadata.db
is located) and click "Save". - Google Drive Integration: For hosting your Calibre library on Google Drive, refer to the Google Drive integration guide.
- Admin Configuration: Configure your instance via the admin page, referring to the Basic Configuration and UI Configuration guides.
- Python Version: Ensure you have Python 3.7 or newer.
- Imagemagick: Required for cover extraction from EPUBs. Windows users may also need to install Ghostscript for PDF cover extraction.
- Optional Tools:
- Calibre desktop program: Recommended for on-the-fly conversion and metadata editing. Set the path to Calibre’s converter tool on the setup page.
- Kepubify tool: Needed for Kobo device support. Download the tool and place the binary in
/opt/kepubify
on Linux orC:\Program Files\kepubify
on Windows.
IIAB Calibre-Web does not support Docker.
We would like to thank all the contributors and maintainers of Calibre-Web for their valuable input and dedication to the project. Your contributions are greatly appreciated.
You can find the current test plan under in the features directory. Currently, there is only one test plan, which is basic_behavior.feature.
Here what the layout of an example test plan looks like looks like:
Feature: Basic behavior
Testing basic behavior like showing home page and login
Scenario: Home Page
Given Calibre-Web is running
When I go to the home page
Then I should not see the error message
And see homepage information
A scenario is a specific test. Depending on the test, some things are taken as given, when an action is performed, then a certain state is reached.
The tests are implemented using pytest-splinter, pytest-bdd and Selenium. The gist of all of this is to say that these are tests using behavior-driven development. Pytest-splinter is the main driver of the tests, it is what is really driving the browser through the use of Selenium.
Currently, we are limited to using Firefox and Chrome as a result of Splinter (a dependency of pytest-splinter) not supporting Chromium. If this were to change in the future though, we would probably rather use Chromium over Chrome as that is the default browser used with Raspberry Pi.
You can see tests in the /tests/functional directory. Currently there is only one test file, test_basic_behavior.py.
Here is an example of one test:
@scenario('basic_behavior.feature', 'Home Page')
def test_home_page():
"""Home Page."""
@given('Calibre-Web is running')
def _(step_context):
"""Calibre-Web is running."""
step_context['ip_address'] = 'localhost:8083'
@when('I go to the home page')
def _(browser, step_context):
"""I go to the home page."""
url = urljoin("".join(['http://', str(step_context['ip_address'])]), '/')
browser.visit(url)
@then('I should not see the error message')
def _(browser, step_context):
"""I should not see the error message."""
@then('see homepage information')
def _(browser):
"""see homepage information."""
print("!!!!!!!")
print(browser.title)
print(browser.url)
print("!!!!!!!")
assert browser.is_text_present('Books'), 'Book test'
If you compare this test to the test I showed you in this test plan, then you will see that is pretty much exactly the same. Especially pay attention to the fixtures (the lines that begin with @).
-
Install Chrome and/or Firefox to enable Selenium testing:
-
Install Chrome for Ubuntu and/or
-
Install Firefox [NB: If you are on Ubuntu Deskop you must remove the Firefox Snap with
sudo snap remove firefox
, or else the tests will fail]
-
-
Enter into the directory where Calibre-Web is located:
cd /usr/local/calibre-web-py3
-
Install the integration test requirements in the same virtual environment:
pip install -r integration-tests-requirements.txt
If you want to watch the test run
pytest -s --splinter-webdriver chrome
And/or you can just run headless:
pytest -s --splinter-webdriver chrome --splinter-headless
To run the tests with the Firefox browser instead, replace chrome with firefox.
Join us on Discord
For more information, How To's, and FAQs, please visit the Wiki
To contribute, please check our Contributing Guidelines. We welcome issues, feature requests, and pull requests from the community.
If you encounter bugs or issues, please report them in the issues section of the repository. Be sure to include detailed information about your setup and the problem encountered.
We welcome suggestions for new features. Please create a new issue in the repository to discuss your ideas.
- Documentation: Comprehensive documentation is available on the Calibre-Web wiki.
- Community Contributions: Explore the community contributions to see ongoing work and how you can get involved.
Thank you for using Calibre-Web! We hope you enjoy managing your eBook library with our tool.