agentleFS
ChenShegChenSheg/knowledge-from-literature-and-bilibili/literature-parse/SKILL.md

literature-parse

Skill1 starsChanged 5 months agoMITView on GitHub

Parse academic PDF content into Markdown, plain text, or structured JSON. Auto-selects the best available backend: pymupdf4llm for layout-aware Markdown, falling back to PyMuPDF/fitz with heuristic heading detection. Extracts title, author, page count, abstract and section list. Supports single files and batch directory processing. For scanned PDFs or heavy formulas/tables, guides you to MinerU (SOTA open-source parser). Use when: converting papers to Markdown/text, extracting abstracts or sections, preparing PDFs for RAG/LLM analysis, or building a parsed literature corpus.

  • Installs packages

The file

Files
SKILL.md

Literature Parse (文献内容解析)

把 PDF 论文解析成 Markdown / 纯文本 / 结构化 JSON,自动提取标题、作者、页数、摘要与章节列表。

后端策略(自动择优)

优先级后端适用安装
1pymupdf4llm版式感知 Markdown,原生 PDF 最佳pip install pymupdf4llm
2PyMuPDF/fitz纯文本 + 启发式标题识别,通常已预装pip install pymupdf
—MinerU扫描件 / 复杂公式表格(SOTA,需 GPU 更佳)见下方

脚本会自动检测:装了 pymupdf4llm 就用它出 Markdown,否则回退 fitz。

快速使用

# 单篇 -> paper.md + paper.meta.json
python scripts/parse.py paper.pdf

# 纯文本输出
python scripts/parse.py paper.pdf --format txt

# 批量解析一个目录(输出到 <dir>/parsed)
python scripts/parse.py ./pdfs --out ./parsed

# 强制指定后端
python scripts/parse.py paper.pdf --backend fitz

参数:

  • input:单个 PDF 或包含 PDF 的目录
  • --format:md(默认,Markdown)或 txt(纯文本)
  • --backend:auto(默认)/ pymupdf4llm / fitz
  • --out:输出目录

输出

每篇 PDF 生成:

  • <name>.md 或 <name>.txt — 正文
  • <name>.meta.json — 标题、作者、页数、摘要、章节列表、字符数、所用后端

高精度场景:MinerU

原生 PDF 用本 skill 足够;若遇到扫描件、复杂公式、跨栏/合并单元格表格,推荐用 MinerU(OmniDocBench 综合第一):

pip install -U "mineru[core]"
mineru -p paper.pdf -o ./out          # 输出 markdown + 图片 + 结构化 json

与其他 skill 衔接

上游 literature-download 下载 PDF → 本 skill 解析 → Markdown/JSON 供后续 RAG、综述、知识图谱抽取使用。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.