Skip to content

iiab/calibre-web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calibre-Web on IIAB

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

This software is a friendly fork of Calibre-Web designed to be run inside of an Internet-in-a-Box.

Main screen

Features

Installation

  1. If you don't have an existing IIAB, start here:

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

  2. Installing on an existing Internet-in-a-Box (IIAB):

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

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/iiab/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

  • IIAB: IIAB Calibre-Web is designed for running on top of an Internet-in-a-Box install
  • 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.

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.

If your problem is generic to the upstream janeczku/calibre-web you may wish to report your issue there.

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.7%
  • Python 30.2%
  • JavaScript 26.1%
  • HTML 11.2%
  • CSS 0.7%
  • Shell 0.1%