Skip to content

feat(harmonia-convert): introduce subprocess-based ebook conversion crate#219

Merged
forkwright merged 1 commit intomainfrom
feat/211-conversion-v1
Apr 22, 2026
Merged

feat(harmonia-convert): introduce subprocess-based ebook conversion crate#219
forkwright merged 1 commit intomainfrom
feat/211-conversion-v1

Conversation

@forkwright
Copy link
Copy Markdown
Owner

Introduces crates/harmonia-convert/, a library-only crate that wraps calibre ebook-convert, kepubify, and pandoc as tokio::process subprocesses.

What this PR does

  • Adds ConvertOptions (#[non_exhaustive] from day 1), DeviceProfile, and ConvertOutcome types.
  • Implements dispatch heuristic in convert_ebook():
    • .docx/.odt.epub via pandoc
    • .epub.kepub.epub via kepubify
    • everything else via calibre
  • ConvertError snafu enum with 6 variants: InputMissing, OutputPathInvalid, SubprocessFailed, SubprocessTimeout, UnsupportedFormat, BinaryNotFound.
  • Subprocesses run with env_clear() + explicit PATH subset (no full environment inheritance).
  • Tests: error round-trips, InputMissing, OutputPathInvalid, BinaryNotFound (PATH=/dev/null), and an #[ignore]-gated real calibre conversion test.

What this PR does NOT do

  • No paroche HTTP routes wired yet (follow-up per research §7).
  • No database tables or job queue — library surface only.

License boundary

GPL-3 stays process-boundary; harmonia license (AGPL-3.0-or-later) is unaffected per FSF FAQ + Pandoc precedent (research §5).

Closes #211

…rate

New library crate wrapping calibre ebook-convert, kepubify, and pandoc
as tokio::process subprocesses. Library-only this PR; paroche route
integration is a follow-up per research §7.

GPL-3 stays process-boundary; harmonia license (AGPL-3.0-or-later)
unaffected per FSF FAQ + Pandoc precedent (research §5).

Closes #211
@forkwright forkwright merged commit 11f10f0 into main Apr 22, 2026
1 check passed
@forkwright forkwright deleted the feat/211-conversion-v1 branch April 22, 2026 20:26
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.

research: ebook format conversion engine (ebook-convert parity)

1 participant