Skip to content

0.25.0: drop EPUB and ebooklib (AGPL) - #9

Merged
CocoRoF merged 1 commit into
mainfrom
chore/drop-epub-ebooklib
Sep 23, 2026
Merged

CocoRoF merged 1 commit into
mainfrom
chore/drop-epub-ebooklib

Conversation

@CocoRoF

@CocoRoF CocoRoF commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Why

EPUB → Markdown ran on ebooklib (AGPL-3.0). XGEN keeps no AGPL dependency (PyMuPDF went in 0.24.0), and EPUB is not a format XGEN supports — so the path is removed, not rewritten.

What changes

  • doc_to_md: EPUB converter and its manifest/image helpers removed; .epub is no longer a native format.
  • simple._convert_requests, tools.convert, SourceFormat, project_manager: no .epub. An .epub source now raises Unsupported source format instead of the old silent empty Markdown.
  • Hosted entry points (MCP server, generate/edit jobs) default unknown MIME types to pdf; application/epub+zip is refused before that so an EPUB upload is not misread as a broken PDF.
  • ebooklib removed from dependencies; docs and READMEs updated.
  • hwp_convert comments cite the published HWP 5.0 spec (rev 1.3 table 6 control characters, table 26 border widths) instead of pyhwp — the values are the spec's.

Tests

  • New tests/unit/test_epub_removed.py: every entry refuses EPUB; pyproject may not list pymupdf / ebooklib / pyhwp / xgen-contextifier again.
  • Full suite: 932 passed, 1 skipped (Python 3.12, .[dev], ebooklib not installed).

🤖 Generated with Claude Code

EPUB → Markdown ran on ebooklib (AGPL-3.0). XGEN keeps no AGPL dependency,
and EPUB is not a format XGEN supports, so the whole path goes rather than
being rewritten.

- doc_to_md: _convert_epub / _sanitize_epub_manifest / _epub_image_candidates
  removed; .epub is no longer a native format.
- simple / tools.convert / SourceFormat / project_manager: no .epub entry.
  An .epub source now fails with "Unsupported source format" instead of the
  old silent empty Markdown (ebooklib missing → "" → grounding silently empty).
- Hosted entry points (MCP server, generate/edit jobs) map unknown MIME types
  to pdf; application/epub+zip is refused before that, so an EPUB upload is
  not misread as a broken PDF.
- ebooklib removed from dependencies; docs/READMEs updated.
- hwp_convert comments cite the published HWP 5.0 spec (rev 1.3 table 6
  control characters, table 26 border widths) instead of pyhwp — the values
  are the spec's.
- tests: every entry refuses EPUB; pyproject may not list pymupdf / ebooklib /
  pyhwp / xgen-contextifier again.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@CocoRoF
CocoRoF merged commit d0dffa5 into main Sep 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant