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 root.xml 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
  • KyBook 3 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.1.tar.gz (23.2 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.1-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lib2opds-0.1.1.tar.gz
  • Upload date:
  • Size: 23.2 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.1.tar.gz
Algorithm Hash digest
SHA256 6bb837de1081e7b4623951949d71a41e622083f530376c9fa41bbf5ab60bd3b6
MD5 3342c57895efd186ff208ca2a5b14b6d
BLAKE2b-256 2089c2b62206c2c00310b42bd3a6117e334815567a62d88ee912cdac45f240f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lib2opds-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 24.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9bfd78300601f5a7a1868619785dd3dfd9f41e54aba5f6ddc26246aba328761a
MD5 76c4692388ce8f7046c981ded9e8e18f
BLAKE2b-256 58a74910fa8f4016fc84053a48009b9c6c126013fe44ce0ae15e30831b59674f

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