crocodilestick / Calibre-Web-Automated

Calibre-Web but automated and with Calibre features! Fully automate and simplify your eBook set up!
https://github.com/crocodilestick/Calibre-Web-Automated
GNU General Public License v3.0
822 stars 19 forks source link
automation calibre calibre-web conversion docker ebook ebooks epub import kepub kindle kobo self-hosted

Calibre-Web Automated (formerly Calibre-Web Automator)

Calibre-Web Automated

Making Calibre-Web your dream, all-in-one self-hosted digital library solution.

Docker Pulls GitHub Release GitHub commits since latest release

Quick Access

Why does it exist? πŸ”“

Calibre, while a fantastic tool for its age, has several problems when containerised, including its reliance on a KasmVNC server instance for the UI, which is near impossible to use on mobile and is relatively resource-heavy if you're running a small, lower power server like I am.

For many, Calibre-Web has really swooped in to save the day, offering an alternative to a containerised Calibre instance that's quick, easy to set up, resource-light and with a much more modern UI to boot.

However, when compared to full-fat Calibre, it unfortunately lacks a few core features leading many to run both services in parallel, each serving to fill in where the other lacks, resulting in an often clunky, imperfect solution.

What Does it do? 🎯

After discovering that using the DOCKER_MODS universal-calibre environment variable, you could gain access to Calibre's fantastic eBook conversion tools, both in the Web UI and in the container's CLI, I set about designing a similar solution that could really make the most of all of the tools available to try and fill in the gaps in functionality I was facing with Calibre-Web so that I could finally get rid of my bulky Calibre instance for good.

Calibre-Web Automated Example Homepage

CWA allows you to keep your ebook library accessible & organised and looks good while doing it 😎🦚

Features:

CWA supports all Stock CW Features:

Modern & responsive Bootstrap 3 HTML5 interface Comprehensive user management with per-user permissions OPDS feed for ereader apps
eBook metadata editing and deletion support Metadata download from various sources (extensible via plugins) 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 Content hiding based on categories and Custom Column content per user "Magic Link" login for easy access on eReaders
LDAP, Google/GitHub OAuth, and proxy authentication support Advanced search and filtering options Multilingual user interface supporting 20+ languages

Plus these CWA Specific ones on top:

Cover Enforcement CWA

Calibre-Web Automated

UNDER ACTIVE DEVELOPMENT ⚠️

Features Currently Under Active Development and on our Roadmap πŸ—οΈπŸ›£οΈ

High Priority 🚨

Lower Priority 🌱

Please suggest any ideas or wishes you might have! we're open to anything!

How To Install πŸ“–

Quick Install πŸš€

  1. Download the Docker Compose template file using the command below:
curl -OL https://raw.githubusercontent.com/crocodilestick/calibre-web-automated/main/docker-compose.yml
  1. Move the compose file to an empty folder (e.g. ~/docker/calibre-web-automated/docker-compose.yml). This will be used to store the server data and library

  2. Navigate to where you downloaded the Compose file using cd and run:

docker compose up -d

And that's you off to the races! πŸ₯³ HOWEVER to avoid potential problems and ensure maximum functionality, we recommend carrying out these Post-Install Tasks Here.


Using Docker Compose πŸ‹β­(Recommended)

1. Setup the container using the Docker Compose template below: πŸ‹πŸ“œ

---
services:
  calibre-web-automated:
    image: crocodilestick/calibre-web-automated:latest
    container_name: calibre-web-automated
    environment:
      - PUID=1000
      - PGID=100
      - TZ=UTC
      - DOCKER_MODS=lscr.io/linuxserver/mods:universal-calibre-v7.16.0
    volumes:
      - /path/to/config/folder:/config
      - /path/to/the/folder/you/want/to/use/for/book/ingest:/cwa-book-ingest
      - /path/to/your/calibre/library:/calibre-library
      #- /path/to/your/gmail/credentials.json:/app/calibre-web/gmail.json #Optional
    ports:
      - 8084:8083 # Change the first number to change the port you want to access the Web UI, not the second
    restart: unless-stopped

Explanation of the Container Bindings:

And just like that, Calibre-Web Automated should be up and running! HOWEVER to avoid potential problems and ensure maximum functionality,we recommend carrying out these Post-Install Tasks Here.

Users migrating from stock Calibre-Web

Post-Install Tasks:

Calibre-Web Quick Start Guide

  1. Open your browser and navigate to http://localhost:8084 or http://localhost:8084/opds for the OPDS catalog
  2. Log in with the default admin credentials (below)
  3. Configure your Calibre-Web instance via the admin page, referring to the Basic Configuration and UI Configuration guides
  4. Add books by having them placed in the folder you bound to cwa-book-ingest in your Docker Compose
  5. CWA currently requires all books in the library to be in .epub format. If your existing library contains any books of different filetypes, navigate to the Admin panel and scroll until you see the "Convert Library to EPUB" option.
    • A live log page will then be loaded to allow you to monitor the progress of the conversion process.
    • All files processed during this process, whether successfully converted or not, will be backed up to /config/processed_books
  6. Drop a book into your ingest folder to check everything is working and enjoy!

Default Admin Login:

Username: admin\ Password: admin123

Usage πŸ”§

Adding Books to Your Library

CWA CLI Tools πŸ§‘β€πŸ’»

The Cover-Enforcer CLI Tool

usage: cover-enforcer [-h] [--log LOG] [--dir DIR] [-all] [-list] [-history] [-paths] [-v]

Upon receiving a log, valid directory or an "-all" flag, this script will enforce the covers and metadata of the corresponding books, making sure that each are correctly stored in
both the epubs themselves and the user's Calibre Library. Additionally, if an epub happens to be in EPUB 2 format, it will also be automatically upgraded to EPUB 3.

options:
  -h, --help     show this help message and exit
  --log LOG      Will enforce the covers and metadata of the books in the given log file.
  --dir DIR      Will enforce the covers and metadata of the books in the given directory.
  -all           Will enforce covers & metadata for ALL books currently in your calibre-library-dir
  -list, -l      List all books in your calibre-library-dir
  -history       Display a history of all enforcements ever carried out on your machine (not yet implemented)
  -paths, -p     Use with '-history' flag to display stored paths of all epubs in enforcement database
  -v, --verbose  Use with history to display entire enforcement history instead of only the most recent 10 entries

CWA Cover-Enforcer History Usage

The Convert-Library Tool

usage: convert-library [-h] [--replace] [--keep] [-setup]

Made for the purpose of converting ebooks in a calibre library not in epub format, to epub format

options:
  -h, --help     show this help message and exit
  --replace, -r  Replaces the old library with the new one
  --keep, -k     Creates a new epub library with the old one but stores the old files in /config/processed_books
  -setup         Indicates to the function whether or not it's being ran from the setup script or manually (DO NOT USE MANUALLY)

Checking the Monitoring Services are working correctly


For Developers - Building Custom Docker Image

If you want to contribute to this project, you can build a local version with your changes by running build.sh in the repository.

The resultant image will then be automatically deployed using the docker-compose.yml.dev (make changes as necessary beforehand) in the directory and the build/ folder will be created, primarily housing the development docker-compose.yml file and its mount points. Add a calibre library here for testing if necessary.

$ chmod +x build.sh
$ ./build.sh

Check out Post-Install Tasks Here when necessary.


Further Development πŸ—οΈ