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/yourusername/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.4.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.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: libraebookmanager-0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 778fd1350b15028a743065b09d0bf65d439532d8ac8f2c1f262c75c7c4bfefc7
MD5 4d580ed81944f0f8c37b7dbe9ddafed8
BLAKE2b-256 13ec0702b03324eb5b15759dd81f168c2c8162c8ef1810c10129422e8891b6b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for libraebookmanager-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0cc95edd0247368ea49e251a953a589c4d3973bef4b63f57e5e46e6230d7527c
MD5 c9a9147b260e4e207bb02ec414c61c93
BLAKE2b-256 95379c3486e5040a7be347333e2f79ad080d138dc908faf1524e2b0e4d32bc94

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