Skip to main content

pro-ledin-ebook-import

skills.sh

Deterministic EPUB-to-Markdown importing for Obsidian vaults and AI-agent workflows. The importer preserves source order and text, copies each original EPUB into the generated book directory, extracts referenced media when chosen, and records SHA-256 metadata for repeatable rebuilds.

Install

pip install pro-ledin-ebook-import

The package uses only the Python standard library at runtime.

CLI

ebook-import import \
  --vault-root "/path/to/vault" \
  --output-dir "05-sources/books" \
  --image-mode import \
  --input "/path/to/book-1.epub" "/path/to/book-2.epub"

Use --image-mode skip to omit image extraction, or run a second step after an image import to replace image links with a complete agent-produced mapping:

ebook-import apply-image-text \
  --book-dir "/path/to/vault/05-sources/books/book-slug" \
  --mapping "/tmp/book-image-text.json"

The mapping shape is:

{
  "image_text": {
    "media/page-001.png": "Recognized text from the image",
    "media/page-002.png": ""
  }
}

apply-image-text validates completeness before changing chapters or deleting media. An incomplete mapping leaves the initial import intact.

Output

Each book is written under the selected output directory:

05-sources/books/
├── index.md
└── <book-slug>/
    ├── book.md
    ├── manifest.json
    ├── original/book.epub
    ├── chapters/*.md
    └── media/*

Repeated imports with the same source hash, importer version, and image mode are no-ops. Changing image mode rebuilds generated output even when the source hash is unchanged.

Development

uv sync --extra dev
uv run --extra dev pytest
uv build

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pro_ledin_ebook_import-0.1.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

pro_ledin_ebook_import-0.1.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file pro_ledin_ebook_import-0.1.0.tar.gz.

File metadata

  • Download URL: pro_ledin_ebook_import-0.1.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pro_ledin_ebook_import-0.1.0.tar.gz
Algorithm Hash digest
SHA256 58f1714979fa7ecdfe156517ecef08d0e770e14188ee8d6665927d9b1f055282
MD5 c30ab6cf77d62a747a551d6e951d139d
BLAKE2b-256 2de78af99806fa1ad4ef70b98c2ebf25d6763529a7a2fd326821c0bf6039e21e

See more details on using hashes here.

File details

Details for the file pro_ledin_ebook_import-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pro_ledin_ebook_import-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pro_ledin_ebook_import-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f24cc4e4e9c4a27e77b1ebef4b697d960b51d71510437d3f4ffd5845f8f98e60
MD5 045d3624795ad454df4ec53c0f3119ca
BLAKE2b-256 c223bb1ff4027a07227b1588b0c02e1847b9b4d1c3b5bdde1fdbe83c310796d2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page