Files
lyxy-document/README.md
lanyuanxiaoyao b98e70383c docs: 分离用户文档与开发文档
- 将 README.md 重构为开发文档,包含开发环境、工作流、代码规范
- 新建 skill/SKILL.md 作为用户文档,包含快速开始和命令选项
- 更新 openspec/config.yaml 添加项目概述和 skill 目录声明
2026-03-08 18:08:44 +08:00

64 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# lyxy-document
统一文档解析工具 - 将 DOCX、XLSX、PPTX、PDF、HTML/URL 转换为 Markdown
## 开发环境
- 使用 uv 管理依赖,禁用主机 Python
- 依赖声明pyproject.toml
- 安装uv sync
## 项目结构
```
scripts/ # 核心代码
├── core/ # 核心模块解析调度、异常、Markdown 工具)
├── readers/ # 格式阅读器
└── utils/ # 工具函数
tests/ # 测试
openspec/ # 规范文档
skill/ # SKILL 文档
```
## 开发工作流
```bash
# 运行测试
uv run pytest
# 代码格式化
uv run black .
uv run isort .
# 类型检查
uv run mypy .
```
## 代码规范
- 语言:仅中文(交流、注释、文档、代码)
- 模块文件150-300 行
- 错误处理:自定义异常 + 清晰信息 + 位置上下文
- Git 提交:类型: 简短描述feat/fix/refactor/docs/style/test/chore
## 解析器架构
### DOCX
docling、unstructured、pypandoc-binary、MarkItDown、python-docx、XML
### XLSX
docling、unstructured、MarkItDown、pandas、XML
### PPTX
docling、unstructured、MarkItDown、python-pptx、XML
### PDFOCR 优先)
docling OCR、unstructured OCR、docling、unstructured、MarkItDown、pypdf
### HTML/URL
trafilatura、domscribe、MarkItDown、html2text
## 许可证
MIT License