Skip to main content

libra is a Python package designed to help you organize and explore your eBook collection.

Project description

Libra Ebook Manager

A Python package to scan a directory of eBooks, extract metadata, and generate an HTML file to display the eBook library with search functionality and Google search links.


Features

  • Scan eBook Directory: Recursively scans a directory for eBook files (PDF, EPUB, etc.).
  • Extract Metadata: Extracts metadata such as title, author, format, and size.
  • Generate HTML: Creates an HTML file to display the eBook library in a clean, searchable format.
  • Google Search Links: Adds a "Click to Google" link below each book's title to search for the book on Google.
  • Search Functionality: Allows users to search for books by name or title.

Installation

  1. Clone the Repository:

    git clone https://github.com/arazshah/libra.git
    cd libra
    
  2. Install Dependencies:

    pip install -r requirements.txt
    
  3. Install the Package:

    pip install .
    

Usage

Command-Line Interface

Run the libra command to scan a directory and generate the HTML file:

libra

You will be prompted to enter the path to your eBook folder. After processing, the script will generate two files:

  1. libra_ebook_data.json: Contains metadata for all eBooks.
  2. libra_ebook_library.html: Displays the eBook library in a browser.

Example

$ libra
Enter the path to your eBook folder: /path/to/your/ebook/folder
JSON data saved to libra_ebook_data.json
HTML file generated at libra_ebook_library.html. Open it in a browser to view your eBook library.

HTML Output

The generated libra_ebook_library.html file will display the eBooks in a clean, searchable format. Each book entry includes:

  • Title: The title of the book (or the file name if the title is unavailable).
  • Author: The author of the book (or "Unknown" if unavailable).
  • Format: The file format (e.g., PDF, EPUB).
  • Size: The file size in KB.
  • Click to Google: A link to search for the book on Google.

Customization

HTML Template

You can customize the HTML template in the html_generator.py file to change the layout, styling, or functionality.


Dependencies

  • Pillow: For image manipulation (optional for thumbnails).
  • PyMuPDF (fitz): For extracting PDF and EPUB pages as images (optional for thumbnails).
  • ebooklib: For handling EPUB metadata.
  • python-magic: For detecting file types.

Contributing

Contributions are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Commit your changes.
  4. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Support

If you encounter any issues or have questions, please open an issue on the GitHub repository.


Acknowledgments

  • Thanks to the developers of Pillow, PyMuPDF, ebooklib, and python-magic for their excellent libraries.
  • Inspired by the need for a simple eBook library manager.

Enjoy managing your eBook collection with Ebook Manager! 📚

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

libraebookmanager-0.5.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

libraebookmanager-0.5-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file libraebookmanager-0.5.tar.gz.

File metadata

  • Download URL: libraebookmanager-0.5.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for libraebookmanager-0.5.tar.gz
Algorithm Hash digest
SHA256 5bb05d59be062bd4808a1871319de818c7aa452fd252f8e4006ccfe863f007b7
MD5 61a9a2773a1dcf0e9b21f41dbc585d53
BLAKE2b-256 865b975bd689a2e34d61803fa17f5cb2b7631f465861bb1a4a8cfbf05a5c0394

See more details on using hashes here.

File details

Details for the file libraebookmanager-0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for libraebookmanager-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 41ca1d013b1d1d16ff8c810a1a96f06461d8af4c7ada52bbdb405917de59efbb
MD5 34de3673ae7057a24e7e1d1d5ee1e151
BLAKE2b-256 e976e05158efdb96c1223e64b978aa3f3e28f8ec9f3428967a455a53d5dc204c

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