Skip to content

iiab/calibre-web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calibre-Web

Calibre-Web is a web app that offers a clean and intuitive interface for browsing, reading, and downloading eBooks using a valid Calibre database.

License Commit Activity All Releases PyPI PyPI - Downloads Discord

Table of Contents (click to expand)
  1. About
  2. Features
  3. Installation
  4. Docker Images
  5. Troubleshooting
  6. Contributor Recognition
  7. Contact
  8. Contributing to Calibre-Web

This software is a fork of library and licensed under the GPL v3 License.

Main screen

Features

  • 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

Installation

  1. NEW Install Instructions for IIAB Calibre-Web:

    https://github.com/iiab/calibre-web/wiki#wrench-installation

  2. Technical Background explaining Calibre-Web on Internet-in-a-Box (IIAB) :

    https://github.com/iiab/iiab/blob/master/roles/calibre-web/README.rst

Installation via pip (recommended) (NOT FOR IIAB CALIBRE-WEB)

  1. 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
    
  2. Activate the virtual environment:
    source calibre-web-env/bin/activate
    
  3. Install Calibre-Web: Use pip to install the application:
    pip install calibreweb
    
  4. Install optional features: For additional functionality, you may need to install optional features. Refer to this page for details on what can be installed.
  5. 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

Important Links

Quick Start

  1. Read the NEW Install Instructions above for IIAB Calibre-Web!
  2. Access Calibre-Web: Open your browser and navigate to:
    http://localhost:8083
    
    or for the OPDS catalog:
    http://localhost:8083/opds
    
  3. Log in: Use the default admin credentials:
    • Username: Admin
    • Password: changeme
  4. Database Setup: If you do not have a Calibre database, download a sample from:
    https://github.com/janeczku/calibre-web/raw/master/library/metadata.db
    
    Move it out of the Calibre-Web folder to avoid overwriting during updates.
  5. Configure Calibre Database: In the admin interface, set the Location of Calibre database to the path of the folder containing your Calibre library (where metadata.db is located) and click "Save".
  6. Google Drive Integration: For hosting your Calibre library on Google Drive, refer to the Google Drive integration guide.
  7. Admin Configuration: Configure your instance via the admin page, referring to the Basic Configuration and UI Configuration guides.

Requirements

  • 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 or C:\Program Files\kepubify on Windows.

Docker Images

IIAB Calibre-Web does not support Docker.

Contributor Recognition

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.

Integration tests

Test plans

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.

How the tests are implemented

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 @).

Prerequisites

  1. Install Chrome and/or Firefox to enable Selenium testing:

  2. Enter into the directory where Calibre-Web is located:

    cd /usr/local/calibre-web-py3
    
  3. Install the integration test requirements in the same virtual environment:

    pip install -r integration-tests-requirements.txt
    

Running the tests

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.

Contact

Join us on Discord

For more information, How To's, and FAQs, please visit the Wiki

Contributing to Calibre-Web

To contribute, please check our Contributing Guidelines. We welcome issues, feature requests, and pull requests from the community.

Reporting Bugs

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.

Feature Requests

We welcome suggestions for new features. Please create a new issue in the repository to discuss your ideas.

Additional Resources


Thank you for using Calibre-Web! We hope you enjoy managing your eBook library with our tool.

About

📚 Web app for browsing, reading and downloading eBooks stored in a Calibre database

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Fluent 31.9%
  • Python 30.3%
  • JavaScript 26.1%
  • HTML 10.9%
  • CSS 0.7%
  • Shell 0.1%