Skip to main content

Directory based library to OPDS feeds generator

Project description

Lib2OPDS

lib2opds generates OPDS (version 1.2) catalog for local e-book library so it can be hosted utilizing web server. Currently meta data extraction is supported only for ePUB format.

Features

  • Directory hierarchy support
  • Virtual directories: new books, authors, etc.
  • ePUB format: metadata extraction, thumbnail generation
  • PDF format: metadata extraction, thumbnail generation
  • "Lazy" updating of feeds. lib2opds re-generates feeds only when new files are added into the library
  • Sidecar files for metadata extraction
  • Global and local configuration files as well as command line options
  • Caching for better processing of libraries with many books

How to install

lib2opds is distributed on PyPI. The best way to install it is with pipx.

pipx install lib2opds

How to use

$ tree ./test-library/
./test-library/
├── Linux
│   └── How Linux Works - Brian Ward.epub
└── Science Fiction
    ├── All Systems Red.epub
    └── I, Robot - Isaac Asimov.epub

$ lib2opds --opds-base-uri "/opds/" --library-base-uri "/library/" --library-dir "./test-library" --opds-dir "./output"

$ tree ./output/
./output/

├── covers
│   ├── 03e1b3fe-66b2-43eb-b9f1-da72813419e2
│   ├── 14cdd72c-680c-491c-a017-ddd0d2dbb1d2
│   └── e01dab66-3f78-402a-9ac8-83ebc6b24f11
├── feeds
│   ├── 101bcb13-37bf-4e13-a543-22c5ff3567d3.xml
│   ├── 127ae484-af53-4056-9cff-517984321e26.xml
│   └── db1d5760-72f5-4f23-af42-d9d6406207c9.xml
└── index.xml

/etc/lib2opds.ini is used by default and options can be overridden via command line arguments.

Example of configuration file for Nginx:

location /library {
        alias /library-dir;
}

location /opds {
        auth_basic  "Library Area";
        auth_basic_user_file /etc/nginx/htpasswd;
        alias /opds-dir;
        index index.xml;
}

location /opds/covers {
        alias /opds-dir/covers;
}

Library location here is not protected with basic auth because of the bug in some e-book reader software.

Tested devices and applications

  • PocketBook devices with "Network Libraries" feature
  • KyBook 3 eBook Reader
  • Foliate eBook Reader

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lib2opds-0.1.2.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lib2opds-0.1.2-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file lib2opds-0.1.2.tar.gz.

File metadata

  • Download URL: lib2opds-0.1.2.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.1.0-17-amd64

File hashes

Hashes for lib2opds-0.1.2.tar.gz
Algorithm Hash digest
SHA256 defbe4c4b8b5e5e48580a2058a86f13388eb8db11aad30d5e52b3fe55ea74722
MD5 8a4831fd646d324d340ec91b61b1543b
BLAKE2b-256 7d5d7560f8d94125f9e67b584b25670d882297b6f0360a3d92b0e0dd43040823

See more details on using hashes here.

File details

Details for the file lib2opds-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: lib2opds-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.1.0-17-amd64

File hashes

Hashes for lib2opds-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7445eea15167cbef3204bb6391ec87b126c29d9fc71127194ad27dbf0ea7d13b
MD5 b76692f6949dbd9dc88b756ee3845fc7
BLAKE2b-256 f7a53b18607a398e44cd38117a0ebbad5c3ae30b07ccdd8fc915bf7fbcc6fde8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page