← 返回
未分类 中文

marker

Convert PDF documents to Markdown using marker_single. Use when Claude needs to extract text content from PDFs while preserving LaTeX formulas, equations, an...
使用marker_single将PDF文档转换为Markdown格式。当Claude需要从PDF中提取文本内容并保留LaTeX公式和方程时使用。
wu-uk wu-uk 来源
未分类 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 382
下载
💾 0
安装
1
版本
#latest

概述

Marker PDF-to-Markdown Converter

Convert PDFs to Markdown while preserving LaTeX formulas and document structure. Uses the marker_single CLI from the marker-pdf package.

Dependencies

  • marker_single on PATH (pip install marker-pdf if missing)
  • Python 3.10+ (available in the task image)

Quick Start

from scripts.marker_to_markdown import pdf_to_markdown

markdown_text = pdf_to_markdown("paper.pdf")
print(markdown_text)

Python API

  • pdf_to_markdown(pdf_path, *, timeout=600, cleanup=True) -> str
  • Runs marker_single --output_format markdown --disable_image_extraction
  • cleanup=True: use a temp directory and delete after reading the Markdown
  • cleanup=False: keep outputs in _marker/ next to the PDF
  • Exceptions: FileNotFoundError if the PDF is missing, RuntimeError for marker failures, TimeoutError if it exceeds the timeout
  • Tips: bump timeout for large PDFs; set cleanup=False to inspect intermediate files

Command-Line Usage

# Basic conversion (prints markdown to stdout)
python scripts/marker_to_markdown.py paper.pdf

# Keep temporary files
python scripts/marker_to_markdown.py paper.pdf --keep-temp

# Custom timeout
python scripts/marker_to_markdown.py paper.pdf --timeout 600

Output Locations

  • cleanup=True: outputs stored in a temporary directory and removed automatically
  • cleanup=False: outputs saved to _marker/; markdown lives at _marker//.md when present (otherwise the first .md file is used)

Troubleshooting

  • marker_single not found: install marker-pdf or ensure the CLI is on PATH
  • No Markdown output: re-run with --keep-temp/cleanup=False and check stdout/stderr saved in the output folder

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-07 17:04 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 407 📥 151,899
data-analysis

d3-visualization

wu-uk
使用 D3.js (v6) 构建确定性、可验证的数据可视化。从本地数据文件生成独立的 HTML/SVG(可选 PNG),不依赖外部网络。
★ 0 📥 578
office-efficiency

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 483 📥 159,823