Skip to content

Release 0.4.1

Choose a tag to compare

@pablotoledo pablotoledo released this 25 Apr 22:31
· 13 commits to main since this release
1760521

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 MarkItDown to convert various document formats (e.g., PDF, DOCX, PPTX) to Markdown. This feature can be enabled via the --use-markitdown CLI option or use_markitdown=True in the Python API. [1] [2] [3]
  • Updated the README.md with detailed instructions and examples for enabling MarkItDown integration, 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-dir option. 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 -x short form for excluding directories and clarified behavior for invalid inputs. [1] [2]

Codebase Updates:

  • Modified the main function in src/readium/cli.py to handle the new --use-markitdown option and validate directory exclusion inputs. [1] [2]
  • Updated the ReadConfig object to include markitdown_extensions when the feature is enabled.

Test Suite Enhancements:

  • Added integration tests for MarkItDown to verify real conversion functionality with actual files.
  • Added unit tests for the -x/--exclude-dir CLI 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.