원클릭으로
literature-parsing
将 PDF 文献转换为 Markdown 文件,并提取所有图表图片。使用 MinerU (opendatalab) 进行工业级高质量解析。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
将 PDF 文献转换为 Markdown 文件,并提取所有图表图片。使用 MinerU (opendatalab) 进行工业级高质量解析。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Extract structured chemical compound characterization data from chemistry supplementary material documents (PDF/Markdown). 从化学论文补充材料(PDF/Markdown)中提取结构化化合物表征数据。 Use when Kimi needs to extract compound properties including NMR spectra, HRMS, HPLC data, melting points, optical rotation, and yield information from chemistry research papers or supplementary materials. 支持提取NMR谱图、HRMS、HPLC数据、熔点、旋光度、产率等信息。 Supports both single compound extraction and batch extraction of all compounds. 支持单个化合物提取和批量提取所有化合物。
Convert Gaussian gjf input files to XYZ format. 将Gaussian gjf输入文件转换为XYZ格式。 Use when agent needs to convert molecular structure files from Gaussian input format (.gjf) to XYZ format for visualization or use with other computational chemistry software. 当智能体需要将Gaussian输入格式(.gjf)的分子结构文件转换为XYZ格式用于可视化或其他计算化学软件时使用。
Convert PDF files to Markdown using MinerU API. 使用MinerU API将PDF文件转换为Markdown格式。 Use when Kimi needs to extract structured text, images, tables, and formulas from PDF documents while preserving document layout and formatting. 适用于需要提取结构化文本、图片、表格和公式并保留文档布局的场景。 Supports batch conversion and outputs full.md with images/, JSON metadata, and other extracted assets. 支持批量转换,输出full.md、images/目录、JSON元数据等。 Now supports large PDFs (600+ pages) by automatic splitting and merging. 现已支持大文件(600+页)自动拆分和合并处理。
Extract DFT calculation coordinates from PDF files and generate Gaussian gjf files. 从PDF文件中提取DFT计算坐标并生成Gaussian gjf输入文件。 Supports batch processing with separate output folders for each PDF. 支持批量处理,每个PDF单独生成输出文件夹。
Predict and visualize MS/MS spectra from a single SMILES using the fioRa online app. Use when the user wants a mass spectrum, MGF/MSP output, or a plotted stick spectrum from SMILES, with optional custom Name, precursor type, collision energy, and instrument settings.
Predict liquid-phase ¹H and ¹³C NMR chemical shifts from a SMILES string using NMRNet (deep learning, SE(3)-Transformer). Outputs per-atom shift values (ppm) and Lorentzian-broadened spectrum PNG files.
| name | literature-parsing |
| description | 将 PDF 文献转换为 Markdown 文件,并提取所有图表图片。使用 MinerU (opendatalab) 进行工业级高质量解析。 |
| trigger | ["PDF 转 Markdown","PDF 转换","文献解析","提取图片","PDF to Markdown","convert PDF","extract figures","PDF 转 markdown","解析文献","PDF 提取","PDF 转文字"] |
将 PDF 文献完整转换为 Markdown 文件,并自动提取所有图表和图片。使用 MinerU (opendatalab) 进行工业级高质量解析。
| 组件 | 用途 |
|---|---|
| MinerU | 工业级 PDF 解析引擎 (opendatalab) |
| Pipeline Backend | 文本提取、布局分析 |
| OCR | 扫描版 PDF 文字识别 |
转换后的目录结构:
output_folder/
├── document.md # 主 Markdown 文件
├── images/ # 提取的图片
│ ├── xxx.jpg
│ ├── yyy.jpg
│ └── ...
└── document_metadata.json # 文档元数据
将这个 PDF 转换为 Markdown
解析这篇文献,提取所有图片
PDF to Markdown with figures
批量转换这些 PDF 文件
# 基本转换(自动模式)
python3 scripts/literature_parsing.py -i paper.pdf -o ./output
# 文本 PDF(速度快)
python3 scripts/literature_parsing.py -i paper.pdf -o ./output -m txt
# 扫描版 PDF(使用 OCR)
python3 scripts/literature_parsing.py -i paper.pdf -o ./output -m ocr
# 指定语言(提高 OCR 准确率)
python3 scripts/literature_parsing.py -i paper.pdf -o ./output -l en
# 使用 GPU 加速
python3 scripts/literature_parsing.py -i paper.pdf -o ./output -d cuda
# 基本用法
mineru -p paper.pdf -o ./output
# 文本模式(无图片,速度快)
mineru -p paper.pdf -o ./output -m txt
# OCR 模式(扫描版)
mineru -p paper.pdf -o ./output -m ocr
# 指定语言
mineru -p paper.pdf -o ./output -l ch
# 指定设备
mineru -p paper.pdf -o ./output --device cpu
| 参数 | 简写 | 说明 | 默认值 |
|---|---|---|---|
--input | -i | 输入 PDF 文件路径 | - |
--output | -o | 输出目录 | ~/.openclaw/media/literature-parsing |
--method | -m | 解析方法:auto/txt/ocr | auto |
--lang | -l | OCR 语言:ch/en 等 | ch |
--device | -d | 设备:cpu/cuda | cpu |
--quiet | -q | 安静模式(输出 JSON) | false |
$ python3 scripts/literature_parsing.py -i paper.pdf -o ./output
✓ 开始处理:paper.pdf
输出目录:./output
解析方法:auto
设备:cpu
✓ 处理完成:paper.pdf
Markdown: paper.md
图片数量:12 张
✓ 文件已整理到:./output/paper
✅ 转换完成!
📄 Markdown: ./output/paper/paper.md
🖼️ 图片:./output/paper/images (12 张)
📊 元数据:./output/paper/paper_metadata.json
# 处理目录中所有 PDF
for pdf in *.pdf; do
python3 scripts/literature_parsing.py -i "$pdf" -o ./output
done
生成的 Markdown 文件结构:
# 论文标题
作者信息
# Abstract
摘要内容...
# 1. Introduction
正文内容,保留 LaTeX 公式:$E = mc^2$

## 2. Methods
### 2.1 Data Collection
| Column 1 | Column 2 |
|----------|----------|
| Data A | Data B |

# References
[1] Author A, et al. Title. Journal, 2023.
# 安装 MinerU
pip install 'mineru[all]'
# 如果遇到 numpy 版本问题
pip install 'numpy<2.0' 'pandas<3.0'
$...$ 和显示公式 $$...$$-m ocr 模式| 错误 | 说明 | 解决方案 |
|---|---|---|
File not found | PDF 文件不存在 | 检查文件路径 |
Invalid PDF | PDF 格式损坏 | 尝试修复或重新下载 |
Permission denied | 无读取权限 | 检查文件权限 |
No images found | 未找到图片 | PDF 可能使用矢量图形 |
Timeout | 处理超时(>10 分钟) | 尝试 -m txt 模式或减小文件 |
处理化学文献时,可以:
生成高质量论文:
# 转换单篇 PDF
python3 scripts/literature_parsing.py -i nature_paper.pdf -o ./papers/nature
# 查看结果
ls -la ./papers/nature/
# paper.md
# images/xxx.jpg ...
# paper_metadata.json
# 批量转换
mkdir -p ~/papers/library
for pdf in ~/downloads/*.pdf; do
python3 scripts/literature_parsing.py -i "$pdf" -o ~/papers/library
done
# 使用 MinerU 直接处理
mineru -p paper.pdf -o ./output -s 0 -e 9 # 只处理前 10 页
# 使用 txt 模式,速度更快
python3 scripts/literature_parsing.py -i paper.pdf -o ./output -m txt
# 使用 OCR 模式
python3 scripts/literature_parsing.py -i scanned.pdf -o ./output -m ocr
# 指定语言提高准确率
python3 scripts/literature_parsing.py -i scanned.pdf -o ./output -m ocr -l en
# 使用 CPU(兼容性好)
python3 scripts/literature_parsing.py -i paper.pdf -o ./output -d cpu
# 使用 GPU(速度快,需要 CUDA)
python3 scripts/literature_parsing.py -i paper.pdf -o ./output -d cuda
重要:为了能在飞书等平台上发送生成的文件,输出目录必须在白名单内:
~/.openclaw/media/~/.openclaw/workspace/~/.openclaw/agents/本 skill 默认输出到 ~/.openclaw/media/literature-parsing/,可以直接分享!
MinerU 是 opendatalab 开源的工业级 PDF 解析工具:
| 特性 | PyMuPDF | MinerU |
|---|---|---|
| 文本提取 | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| 公式保留 | ❌ | ✅ |
| 表格识别 | ⭐⭐ | ⭐⭐⭐⭐ |
| 布局分析 | ⭐⭐ | ⭐⭐⭐⭐⭐ |
| OCR 支持 | ❌ | ✅ |
| 扫描版支持 | ❌ | ✅ |