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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for libraebookmanager-0.3.tar.gz
Algorithm Hash digest
SHA256 ac181093507f1658656117c299a29c338a561f455a95ba689e8e931ff3e74d7f
MD5 a00c61c69816dc5469c90bffa761fefc
BLAKE2b-256 73bc57cf429fd94ac2448c855f1d4ff965ac04bcf4c2236c76b14746648c6c35

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for libraebookmanager-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e1d65dafb775ecca730983d8ab8af1950a745d54b81ae45960142f270b0108a7
MD5 48700be6c89acafc4fee290d178f4a06
BLAKE2b-256 a7bb5b12bae23d19a8e196bb32f0f70ef75f94fc39cc6dbc73f2b8a33b8a2b4d

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