Add Support for BytesIO Objects in EPUB Reading #292
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This pull request introduces support for BytesIO objects when reading EPUB files. The primary goal is to enhance the flexibility of the EPUB reading functionality, allowing users to read EPUB content from in-memory byte streams.
Changes:
EpubReader
class's_load
).EpubReader
class's_load
function for improved readability and maintainability.Motivation:
The inclusion of support for BytesIO objects addresses a common use case where users may have EPUB content stored in-memory rather than as a file on disk. This is the case when query remote storage for example. This enhancement improves the overall usability and integration capabilities of the EPUB reading module. The refactoring of the _load function makes it easier for developers to locate and understand the EPUB reading logic.
How to Test:
Since tests are not the primary focus at the moment, testing instructions are simplified:
Closes:
N/A
Additional Notes:
_load
function enhances code maintainability and makes it easier for developers to troubleshoot EPUB reading issues.Please review and merge at your earliest convenience.