Anydoc使用

1、说明

可快速将各种文件转为md文件

2、开源网址

GitHub - firecrawl/anydoc: Convert Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF to clean Markdown. Built in Rust, with Node.js and Python bindings. · GitHub

Python教程:anydoc/python/README.md at main · firecrawl/anydoc · GitHub

3、安装

方式1:在Assets里下载whl文件,然后:pip install xxx.whl

方式2:pip install firecrawl-anydoc

4、pdf转md

import anydoc

# From a file path:
markdown = anydoc.to_markdown("test.pdf")

# 打开文件写入,utf-8编码避免中文乱码
with open("output.md", "w", encoding="utf-8") as f:
    f.write(markdown)

 

posted @ 2026-08-13 17:56  朱小勇  阅读(42)  评论(0)    收藏  举报