新觅源码分享开源软件分享 · XinMiCode

登录|注册

消息开通会员
新觅源码分享

开源软件分享,只收取会员费

关于我们用户协议隐私政策会员协议开源许可开通会员全部标签

Gitea微信公众号 · 新觅

© 2026 新觅源码分享. 保留所有权利。

客服反馈

AI 选型助手

描述你的需求,我来帮你选型

说说行业与场景,我会从目录里最多推荐 3 个项目。

Enter 发送 · 游客 20 次/时

首页AI工具开源项目技术教程会员专区我的领取
  1. 首页
  2. ›正文

本页导航

  • 项目介绍
  • 仓库预览
  • 交付方式
  • 用户评论

内容大纲

  • Why Markdown?
  • Prerequisites
  • Installation
  • Usage
  • Command-Line
  • Optional Dependencies
  • Plugins
  • markitdown-ocr Plugin
  • Azure Content Understanding

markitdown

觅心米1小时前更新000
登录查看交付
AI 摘要

Python tool for converting files and office documents to Markdown.

项目简介

MarkItDown

PyPI PyPI - Downloads

[!IMPORTANT] MarkItDown performs I/O with the privileges of the current process. Like open() or requests.get(), it will access resources that the process itself can access. Sanitize your inputs in untrusted environments, and call the narrowest convert_* function needed for your use case (e.g., convert_stream(), or convert_local()). See the Security Considerations section of the documentation for more information.

MarkItDown is a lightweight Python utility for converting various files to Markdown for use with LLMs and related text analysis pipelines. To this end, it is most comparable to textract, but with a focus on preserving important document structure and content as Markdown (including: headings, lists, tables, links, etc.) While the output is often reasonably presentable and human-friendly, it is meant to be consumed by text analysis tools -- and may not be the best option for high-fidelity document conversions for human consumption.

MarkItDown currently supports the conversion from:

  • PDF
  • PowerPoint
  • Word
  • Excel
  • Images (EXIF metadata and OCR)
  • Audio (EXIF metadata and speech transcription)
  • HTML
  • Text-based formats (CSV, JSON, XML)
  • ZIP files (iterates over contents)
  • YouTube URLs
  • EPubs
  • ... and more!

Why Markdown?

Markdown is extremely close to plain text, with minimal markup or formatting, but still provides a way to represent important document structure. Mainstream LLMs, such as OpenAI's GPT-4o, natively "speak" Markdown, and often incorporate Markdown into their responses unprompted. This suggests that they have been trained on vast amounts of Markdown-formatted text, and understand it well. As a side benefit, Markdown conventions are also highly token-efficient.

Prerequisites

MarkItDown requires Python 3.10 or higher. It is recommended to use a virtual environment to avoid dependency conflicts.

With the standard Python installation, you can create and activate a virtual environment using the following commands:

python -m venv .venv
source .venv/bin/activate

If using uv, you can create a virtual environment with:

uv venv --python=3.12 .venv
source .venv/bin/activate
# NOTE: Be sure to use 'uv pip install' rather than just 'pip install' to install packages in this virtual environment

If you are using Anaconda, you can create a virtual environment with:

conda create -n markitdown python=3.12
conda activate markitdown

Installation

To install MarkItDown, use pip: pip install 'markitdown[all]'. Alternatively, you can install it from the source:

git clone git@github.com:microsoft/markitdown.git
cd markitdown
pip install -e 'packages/markitdown[all]'

Usage

Command-Line

markitdown path-to-file.pdf > document.md

Or use -o to specify the output file:

markitdown path-to-file.pdf -o document.md

You can also pipe content:

cat path-to-file.pdf | markitdown

Optional Dependencies

MarkItDown has optional dependencies for activating various file formats. Earlier in this document, we installed all optional dependencies with the [all] option. However, you can also install them individually for more control. For example:

pip install 'markitdown[pdf, docx, pptx]'

will install only the dependencies for PDF, DOCX, and PPTX files.

At the moment, the following optional dependencies are available:

  • [all] Installs all optional dependencies
  • [pptx] Installs dependencies for PowerPoint files
  • [docx] Installs dependencies for Word files
  • [xlsx] Installs dependencies for Excel files
  • [xls] Installs dependencies for older Excel files
  • [pdf] Installs dependencies for PDF files
  • [outlook] Installs dependencies for Outlook messages
  • [az-doc-intel] Installs dependencies for Azure Document Intelligence
  • [az-content-understanding] Installs dependencies for Azure Content Understanding
  • [audio-transcription] Installs dependencies for audio transcription of wav and mp3 files
  • [youtube-transcription] Installs dependencies for fetching YouTube video transcription

Plugins

MarkItDown also supports 3rd-party plugins. Plugins are disabled by default. To list installed plugins:

markitdown --list-plugins

To enable plugins use:

markitdown --use-plugins path-to-file.pdf

To find available plugins, search GitHub for the hashtag #markitdown-plugin. To develop a plugin, see packages/markitdown-sample-plugin.

markitdown-ocr Plugin

The markitdown-ocr plugin adds OCR support to PDF, DOCX, PPTX, and XLSX converters, extracting text from embedded images using LLM Vision — the same llm_client / llm_model pattern that MarkItDown already uses for image descriptions. No new ML libraries or binary dependencies required.

Installation:

pip install markitdown-ocr
pip install openai  # or any OpenAI-compatible client

Usage:

Pass the same llm_client and llm_model you would use for image descriptions:

from markitdown import MarkItDown
from openai import OpenAI

md = MarkItDown(
    enable_plugins=True,
    llm_client=OpenAI(),
    llm_model="gpt-4o",
)
result = md.convert("document_with_images.pdf")
print(result.markdown)

If no llm_client is provided the plugin still loads, but OCR is silently skipped and the standard built-in converter is used instead.

See packages/markitdown-ocr/README.md for detailed documentation.

Azure Content Understanding

Azure Content Understanding provides higher-quality conversion with structured field extraction (YAML front matter), multi-modal support (documents,

源码

觉得不错?点个赞吧!

0

仓库预览

pelmanmoe80-dev/markitdown·main

只读预览

正在加载目录…

商品简介

MarkItDown

PyPI PyPI - Downloads

[!IMPORTANT] MarkItDown performs I/O with the privileges of the current process. Like open() or requests.get(), it will access resources that the process itself can access. Sanitize your inputs in untrusted environments, and call the narrowest convert_* function needed for your use case (e.g., convert_stream(), or convert_local()). See the Security Considerations section of the documentation for more information.

MarkItDown is a lightweight Python utility for converting various files to Markdown for use with LLMs and related text analysis pipelines. To this end, it is most comparable to textract, but with a focus on preserving important document structure and content as Markdown (including: headings, lists, tables, links, etc.) While the output is often reasonably presentable and human-friendly, it is meant to be consumed by text analysis tools -- and may not be the best option for high-fidelity document conversions for human consumption.

MarkItDown currently supports the conversion from:

  • PDF
  • PowerPoint
  • Word
  • Excel
  • Images (EXIF metadata and OCR)
  • Audio (EXIF metadata and speech transcription)
  • HTML
  • Text-based formats (CSV, JSON, XML)
  • ZIP files (iterates over contents)
  • YouTube URLs
  • EPubs
  • ... and more!

Why Markdown?

Markdown is extremely close to plain text, with minimal markup or formatting, but still provides a way to represent important document structure. Mainstream LLMs, such as OpenAI's GPT-4o, natively "speak" Markdown, and often incorporate Markdown into their responses unprompted. This suggests that they have been trained on vast amounts of Markdown-formatted text, and understand it well. As a side benefit, Markdown conventions are also highly token-efficient.

Prerequisites

MarkItDown requires Python 3.10 or higher. It is recommended to use a virtual environment to avoid dependency conflicts.

With the standard Python installation, you can create and activate a virtual environment using the following commands:

python -m venv .venv
source .venv/bin/activate

If using uv, you can create a virtual environment with:

uv venv --python=3.12 .venv
source .venv/bin/activate
# NOTE: Be sure to use 'uv pip install' rather than just 'pip install' to install packages in this virtual environment

If you are using Anaconda, you can create a virtual environment with:

conda create -n markitdown python=3.12
conda activate markitdown

Installation

To install MarkItDown, use pip: pip install 'markitdown[all]'. Alternatively, you can install it from the source:

git clone git@github.com:microsoft/markitdown.git
cd markitdown
pip install -e 'packages/markitdown[all]'

Usage

Command-Line

markitdown path-to-file.pdf > document.md

Or use -o to specify the output file:

markitdown path-to-file.pdf -o document.md

You can also pipe content:

cat path-to-file.pdf | markitdown

Optional Dependencies

MarkItDown has optional dependencies for activating various file formats. Earlier in this document, we installed all optional dependencies with the [all] option. However, you can also install them individually for more control. For example:

pip install 'markitdown[pdf, docx, pptx]'

will install only the dependencies for PDF, DOCX, and PPTX files.

At the moment, the following optional dependencies are available:

  • [all] Installs all optional dependencies
  • [pptx] Installs dependencies for PowerPoint files
  • [docx] Installs dependencies for Word files
  • [xlsx] Installs dependencies for Excel files
  • [xls] Installs dependencies for older Excel files
  • [pdf] Installs dependencies for PDF files
  • [outlook] Installs dependencies for Outlook messages
  • [az-doc-intel] Installs dependencies for Azure Document Intelligence
  • [az-content-understanding] Installs dependencies for Azure Content Understanding
  • [audio-transcription] Installs dependencies for audio transcription of wav and mp3 files
  • [youtube-transcription] Installs dependencies for fetching YouTube video transcription

Plugins

MarkItDown also supports 3rd-party plugins. Plugins are disabled by default. To list installed plugins:

markitdown --list-plugins

To enable plugins use:

markitdown --use-plugins path-to-file.pdf

To find available plugins, search GitHub for the hashtag #markitdown-plugin. To develop a plugin, see packages/markitdown-sample-plugin.

markitdown-ocr Plugin

The markitdown-ocr plugin adds OCR support to PDF, DOCX, PPTX, and XLSX converters, extracting text from embedded images using LLM Vision — the same llm_client / llm_model pattern that MarkItDown already uses for image descriptions. No new ML libraries or binary dependencies required.

Installation:

pip install markitdown-ocr
pip install openai  # or any OpenAI-compatible client

Usage:

Pass the same llm_client and llm_model you would use for image descriptions:

from markitdown import MarkItDown
from openai import OpenAI

md = MarkItDown(
    enable_plugins=True,
    llm_client=OpenAI(),
    llm_model="gpt-4o",
)
result = md.convert("document_with_images.pdf")
print(result.markdown)

If no llm_client is provided the plugin still loads, but OCR is silently skipped and the standard built-in converter is used instead.

See packages/markitdown-ocr/README.md for detailed documentation.

Azure Content Understanding

Azure Content Understanding provides higher-quality conversion with structured field extraction (YAML front matter), multi-modal support (documents,

未领取也可只读浏览目录与文本文件。领取后获得夸克网盘永久分享(含提取码)。

交付方式

登录后即可查看 pelmanmoe80-dev/markitdown 的夸克网盘永久分享(含提取码)。上方仓库预览无需登录也可浏览。

登录查看交付

评论0

登录 后才能发表评论。提交后需管理员审核才会公开。

还没有公开评论。登录后可以提交,审核通过后会出现在这里。

相关推荐

ohmyzsh
公开新上架

ohmyzsh

🙃 A delightful community-driven (with 2,500+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python,…

觅心米1小时前
公开领取00
ollama
公开新上架

ollama

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

觅心米1小时前
公开领取00
printfilm
公开新上架

printfilm

PRINTFILM:AI 科普视频与漫剧创作平台

觅心米6小时前
公开领取10
公开新上架

FckSignups

A list of tools that are open-source, in-browser, and require no-signups!

觅心米1天前
公开领取20

今日推荐

云睿资产管理系统
精选

云睿资产管理系统

会员可领

热门推荐

  1. 1
    云睿资产管理系统

    云睿资产管理系统

    面向数据中心运维的资产管理源码,覆盖机房机柜设备全生命周期,支持 3D 可视化、工单与盘点。

    会员可领

  2. 2

    Omarchy:漂亮、现代且固执己见的 Linux 发行版

    由 DHH 打造的漂亮、有趣且智能的 Linux 发行版,提供精心配置的桌面、开发工具与统一体验。

    公开领取

  3. 3
    skill

    skill

    收录最全、更新最快的技能Skills商店:精选原创技能包(涵盖文档处理、内容创作、编程开发、机器学习、自动化工作流),全部打包好可直接安装使用!同时自动抓取GitHub上万个Skills项目,按分类、更新时间、Star数量整理。The most comprehensive and frequently updated AI Agent skill library, featuring curat…

    公开领取

  4. 4
    fmt:现代 C++ 高性能格式化库

    fmt:现代 C++ 高性能格式化库

    fmt 是一个开源 C++ 格式化库,提供快速、类型安全的字符串格式化,替代传统 printf 和 iostreams。支持 C++20 std::format 等现代特性,高性能且易于使用。

    公开领取

  5. 5
    灵犀 Studio 多模型AI Agent管理控制台源码

    灵犀 Studio 多模型AI Agent管理控制台源码

    私有化部署的一体化AI工作台,支持多模型对话、渠道接入、用量分析、任务调度与运维管理,开箱即用。

    会员可领

会员专属权益

开通会员后,即可领取全部仅会员项目;公开项目登录就能领。

立即开通会员 →

标签云

100天闭包财务系统操作系统大纲生成代码编辑器代码知识图谱调试对象多媒体工具多模型多模型支持多语言发行版高性能格式化全部 115

社区公告

  • 09-08项目评论已开放,登录后提交,审核通过即展示。
  • 09-01微信公众号验证码登录可用,订阅号也能进站。
  • 08-22领取成功即可获得夸克网盘永久分享(含提取码)。

markitdown

公开领取

登录查看交付