From 539e253546dc7cbfa949642020c7bf08c83f9d54 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Sat, 5 Jul 2025 16:27:14 +0800 Subject: [PATCH] 'commit' --- dsLightRag/static/aiSuShi.html | 2 ++ ...{T1_Office_document_test.py => T1_Office_document.py} | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) rename dsRagAnything/Tools/{T1_Office_document_test.py => T1_Office_document.py} (95%) diff --git a/dsLightRag/static/aiSuShi.html b/dsLightRag/static/aiSuShi.html index 0b3a61a4..da9d36e3 100644 --- a/dsLightRag/static/aiSuShi.html +++ b/dsLightRag/static/aiSuShi.html @@ -244,6 +244,8 @@ + + diff --git a/dsRagAnything/Tools/T1_Office_document_test.py b/dsRagAnything/Tools/T1_Office_document.py similarity index 95% rename from dsRagAnything/Tools/T1_Office_document_test.py rename to dsRagAnything/Tools/T1_Office_document.py index 22925856..0f8718e8 100644 --- a/dsRagAnything/Tools/T1_Office_document_test.py +++ b/dsRagAnything/Tools/T1_Office_document.py @@ -1,12 +1,8 @@ import sys -from pathlib import Path - from raganything import RAGAnything - - -def test_office_document_parsing(file_path: str): +def office_document_parsing(file_path: str): supported_extensions = {".doc", ".docx", ".ppt", ".pptx", ".xls", ".xlsx"} if file_path.suffix.lower() not in supported_extensions: print(f"❌ Unsupported file format: {file_path.suffix}") @@ -19,7 +15,6 @@ def test_office_document_parsing(file_path: str): rag = RAGAnything() try: - # Test document parsing with MinerU print("\n🔄 Testing document parsing with MinerU...") content_list, md_content = rag.parse_document( file_path=str(file_path), @@ -105,7 +100,7 @@ def test_office_document_parsing(file_path: str): def main(): file=r"D:\dsWork\dsProject\dsRagAnything\Txt\小学数学教学中的若干问题_MATH_1.docx" - test_office_document_parsing(file) + office_document_parsing(file) if __name__ == "__main__": sys.exit(main()) \ No newline at end of file