Skip to content

refactor(epub): make epub extraction / creation code reusable - #2629

Draft
imnotjames wants to merge 1 commit into
grimmory-tools:developfrom
imnotjames:refactor/2001/make-code-reusable-epub-reader-writer
Draft

refactor(epub): make epub extraction / creation code reusable#2629
imnotjames wants to merge 1 commit into
grimmory-tools:developfrom
imnotjames:refactor/2001/make-code-reusable-epub-reader-writer

Conversation

@imnotjames

@imnotjames imnotjames commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Description

The epub metadata writer has a function that creates an epub from a directory, to extract an epub to a directory using archive service, and a helper to find the OPF path. All three of these are useful in other places, so this extracts them to the archive service, epub content reader, and a new epub content writer utility class.

Linked Issue

related to #2001

Changes

  • Adds ArchiveService.extractToDirectory helper
  • Adds EpubContentReader.findOPFInExtractedEpub
  • Adds EpubContentWriter.createEpubFromDirectory
  • Refactors EpubMetadataWriter to use these helpers
  • Refactors CBXConversionService to use helper extract helper

Manual Testing Steps

Screenshots (Optional)

Additional Context (Optional)

AI Disclosure

Checklist

  • This PR links and implements an accepted issue.
  • This PR is a single focused change.
  • There are new or updated tests validating this change.
  • I ran just ui check and just api check.
  • I have added screenshots if there were any UI changes.
  • I have disclosed any AI usage as per the organization AI Policy above.
  • I understand all of my submitted changes.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@imnotjames
imnotjames force-pushed the refactor/2001/make-code-reusable-epub-reader-writer branch from 171492b to dd1af2c Compare September 14, 2026 04: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.

1 participant