-
Notifications
You must be signed in to change notification settings - Fork 0
Feature MBEP#314 m2docx #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds markdown to DOCX conversion functionality (feature MBEP#314) by integrating an adapted version of the md2docx-python library and introducing a postprocessor architecture to handle multiple output formats.
- Added markdown to DOCX conversion capability using an extracted and adapted version of the md2docx-python library
- Introduced a postprocessor architecture with support for multiple output formats (none/passthrough, md2docx, md2html)
- Updated CLI to support postprocessing options and refactored output handling to use the new postprocessor system
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_md2docx.py | New test file with comprehensive tests for markdown to DOCX conversion including text, lists, tables, and headers |
| tests/Makefile | Added test_md2docx.py to the test suite |
| templateprocessor/postprocessor.py | New module defining postprocessor architecture with abstract base class and concrete implementations for MD2DOCX, MD2HTML, and passthrough processing |
| templateprocessor/md2docx.py | New module containing markdown to DOCX conversion logic extracted from md2docx-python project with modifications for text input and enhanced table support |
| templateprocessor/cli.py | Updated to integrate postprocessor system, added postprocessing CLI argument, and refactored output generation to use postprocessors |
| setup.py | Added dependencies for python-docx, bs4, and markdown2 packages |
| requirements.txt | Added the same dependencies to requirements file |
| examples/generate_so_list.sh | Added example command demonstrating md2docx postprocessing |
| examples/generate_ecss_demo.sh | Refactored script to use loop and added md2docx and md2html postprocessing examples |
| LICENSE.MD2DOCX | Added MIT license file for the adapted md2docx-python code |
Comments suppressed due to low confidence (1)
tests/test_md2docx.py:26
- This assignment to 'paragraphs' is unnecessary as it is redefined before this value is used.
paragraphs = [p.text for p in doc.paragraphs if p.text.strip()]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.