Skip to main content

A CLI and GUI tool to download a book on https://shamela.ws to an EPUB book.

Project description

shamela2epub

A CLI and GUI tool to download a book on Shamela Library Website into an EPUB book.

en ara

logo

Codacy Badge PyPI version PyPI Downloads

GitHub release GitHub Downloads

made-with-python Open Source Love

PayPal LiberaPay

Disclaimer:

  • This software is freeware and open source and is only intended for personal or educational use.

Installation

From PyPI

pip install shamela2epub

From the cloned repository

# Using poetry
poetry install

# or using pip 18+
pip install .

Usage

Command-line Tool (CLI)

python3 -m shamela2epub download URL
# python3 -m shamela2epub download "https://shamela.ws/book/823"

python3 -m shamela2epub download --help
Usage: python -m shamela2epub download [OPTIONS] URL

  Download Shamela book form URL to ePub

Options:
  -o, --output TEXT  ePub output book custom name
  --help             Show this message and exit.

Graphical User Interface (GUI)

gui

  • If you installed the package from PyPI, you can use the following command:
shamela2epubgui
  • If you downloaded the latest gui exe file from releases you can open it normally and use it.
  • Otherwise, use normal python command:
python3 -m shamela2epub gui

Features

  • CLI and GUI!
  • Creates an EPUB3 RTL standard book.
  • Automatically adds a page for book information.
  • Automatically generated table of contents with support for nested chapters.
  • Automatically adds book part and page number to each page's footer.
  • Sanitizes the book HTML from unnecessary elements and classes.
  • Converts inline CSS color styles to CSS classes.
  • Inline footnotes for easier navigation, click any footnote, and it will appear in a popup instead of having all footnotes in page footer.

Known Issues

  • Books that have a last nested section with level deeper (e.g. 3) than its next section (e.g. 2) and both have the same page number (e.g. page_017.xhtml) cannot be converted to KFX unless that last nested section is removed.

TODO

Next

  • You tell me :)

Maybe

  • Fix TOC conversion problem when last nested section with level deeper than its next has the same page number by removing it from the TOC.

Acknowledgments

  • GUI icons are made by the amazing Phosphor Icons (books - duotone - #AB8B64).

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

shamela2epub-1.4.3.tar.gz (193.6 kB view details)

Uploaded Source

Built Distribution

shamela2epub-1.4.3-py3-none-any.whl (198.2 kB view details)

Uploaded Python 3

File details

Details for the file shamela2epub-1.4.3.tar.gz.

File metadata

  • Download URL: shamela2epub-1.4.3.tar.gz
  • Upload date:
  • Size: 193.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.13 Darwin/23.4.0

File hashes

Hashes for shamela2epub-1.4.3.tar.gz
Algorithm Hash digest
SHA256 a0357b62b89769fe9ecc04accd1d229aed245ef19f5b7a6a35ae0a80f9425cf1
MD5 87ed2f535fda195e7e6c39b33cf5d952
BLAKE2b-256 ffb24b9ffaa962463ab7ca4942057cd3e5493ffa87d9ca67e4e9ca5a3885e6bb

See more details on using hashes here.

File details

Details for the file shamela2epub-1.4.3-py3-none-any.whl.

File metadata

  • Download URL: shamela2epub-1.4.3-py3-none-any.whl
  • Upload date:
  • Size: 198.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.13 Darwin/23.4.0

File hashes

Hashes for shamela2epub-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5048c93be0c8b9ddbf2e19ce8f6552571375f7e3d1e5a813b8079eb781a0e67d
MD5 dc398389ee93afd0e37a92b80de9249e
BLAKE2b-256 9b5a8237185b1d94478603437a044889702496efc621fb17e3692f8b61e29217

See more details on using hashes here.

Supported by

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