Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
work review
Sidney233c05e77fcdd52
diff --git a/mineru/model/docx/docx_converter.py b/mineru/model/docx/docx_converter.pyindex 8a6a029d..b369d0a7 100644--- a/mineru/model/docx/docx_converter.py+++ b/mineru/model/docx/docx_converter.py@@ -24,11 +24,6 @@ from mineru.utils.docx_fomatting import Formatting, Scriptfrom mineru.utils.enum_class import BlockType, ContentTypefrom mineru.utils.pdf_reader import image_to_b64str-ACCEPTED_MIME_TYPE_PREFIXES = [- "application/vnd.openxmlformats-officedocument.wordprocessingml.document",-]--class DocxConverter:_BLIP_NAMESPACES: Final = {"a": "http://schemas.openxmlformats.org/drawingml/2006/main",diff --git a/mineru/model/pptx/__init__.py b/mineru/model/pptx/__init__.pynew file mode 100644index 00000000..e69de29bdiff --git a/mineru/model/pptx/pptx_converter.py b/mineru/model/pptx/pptx_converter.pynew file mode 100644index 00000000..56ae638c--- /dev/null+++ b/mineru/model/pptx/pptx_converter.py@@ -0,0 +1,32 @@+from typing import Final, BinaryIO++from pptx import Presentation, presentation+++class PptxConverter:+ _BLIP_NAMESPACES: Final = {+ "a": "http://schemas.openxmlformats.org/drawingml/2006/main",+ "c": "http://schemas.openxmlformats.org/drawingml/2006/chart",+ "p": "http://schemas.openxmlformats.org/presentationml/2006/main",+ }++ def __init__(self):+ self.file_stream = None+ self.pptx_obj = None++ def convert(+ self,+ file_stream: BinaryIO,+ ):+ self.file_stream = file_stream+ self.pptx_obj = Presentation(self.file_stream)+ if self.pptx_obj:+ self._walk_linear(self.pptx_obj)++ def _walk_linear(self, pptx_obj: presentation.Presentation):+ slide_width = pptx_obj.slide_width+ slide_height = pptx_obj.slide_height++ # 遍历每一张幻灯片+ for _, slide in enumerate(pptx_obj.slides):+ pass\ No newline at end of filediff --git a/pyproject.toml b/pyproject.tomlindex 4bbda444..89e5d6fb 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -42,6 +42,7 @@ dependencies = ["mineru-vl-utils>=0.1.19.1,<1","qwen-vl-utils>=0.0.14,<1","python-docx>=1.2.0,<2",+ 'python-pptx>=1.0.2,<2',"mammoth>=1.11.0,<2","pylatexenc>=2.10,<3","lxml>=4.0.0,<7.0.0",