refactor: 移除 doc 和 ppt reader 支持

移除对旧版 .doc 和 .ppt 格式的支持,以简化项目架构和减少维护负担。

变更内容:
- 删除 scripts/readers/doc/ 目录
- 删除 scripts/readers/ppt/ 目录
- 从 readers/__init__.py 中移除 DocReader 和 PptReader
- 从 utils/file_detection.py 中移除 is_valid_doc 和 is_valid_ppt
- 从 config.py 中移除 doc 和 ppt 依赖配置
- 从 advice_generator.py 中移除相关映射
- 更新 CLI 帮助文档
- 更新 README.md 文档
- 删除相关测试用例
- 删除相关规范文档
This commit is contained in:
2026-03-11 00:55:15 +08:00
parent fad0edc46a
commit 65c746c639
22 changed files with 9 additions and 564 deletions

View File

@@ -6,7 +6,7 @@ from typing import List, Optional
def _is_valid_ole(file_path: str) -> bool:
"""验证 OLE2 格式文件(DOC/XLS/PPT"""
"""验证 OLE2 格式文件(XLS"""
try:
import olefile
except ImportError:
@@ -48,21 +48,11 @@ def is_valid_xlsx(file_path: str) -> bool:
return _is_valid_ooxml(file_path, _XLSX_REQUIRED)
def is_valid_doc(file_path: str) -> bool:
"""验证文件是否为有效的 DOC 格式"""
return _is_valid_ole(file_path)
def is_valid_xls(file_path: str) -> bool:
"""验证文件是否为有效的 XLS 格式"""
return _is_valid_ole(file_path)
def is_valid_ppt(file_path: str) -> bool:
"""验证文件是否为有效的 PPT 格式"""
return _is_valid_ole(file_path)
def is_valid_pdf(file_path: str) -> bool:
"""验证文件是否为有效的 PDF 格式"""
try:
@@ -82,7 +72,3 @@ def is_html_file(file_path: str) -> bool:
def is_url(input_str: str) -> bool:
"""判断输入是否为 URL"""
return input_str.startswith("http://") or input_str.startswith("https://")