Release 0.4.1
This pull request introduces significant enhancements to the Readium tool, including the integration of the MarkItDown library for document conversion, improvements to the CLI for directory exclusion, and corresponding updates to the documentation and test cases. Below is a summary of the most important changes grouped by theme.
MarkItDown Integration:
- Added support for
MarkItDownto convert various document formats (e.g., PDF, DOCX, PPTX) to Markdown. This feature can be enabled via the--use-markitdownCLI option oruse_markitdown=Truein the Python API. [1] [2] [3] - Updated the
README.mdwith detailed instructions and examples for enablingMarkItDownintegration, including dependency installation and supported file types. [1] [2]
Directory Exclusion Enhancements:
- Improved the CLI to allow specifying multiple directories for exclusion using the
-x/--exclude-diroption. Added validation to ensure no empty values are provided and included a runtime display of excluded directories. [1] [2] [3] - Updated documentation with examples of using the
-xshort form for excluding directories and clarified behavior for invalid inputs. [1] [2]
Codebase Updates:
- Modified the
mainfunction insrc/readium/cli.pyto handle the new--use-markitdownoption and validate directory exclusion inputs. [1] [2] - Updated the
ReadConfigobject to includemarkitdown_extensionswhen the feature is enabled.
Test Suite Enhancements:
- Added integration tests for
MarkItDownto verify real conversion functionality with actual files. - Added unit tests for the
-x/--exclude-dirCLI option to ensure correct handling of single, multiple, duplicate, and empty values.
These updates enhance the usability and flexibility of the Readium tool, making it more powerful for document processing tasks.