█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

MarkItDown

PDF, Office दस्तावेज़ और अन्य फ़ाइलों को LLM के लिए साफ़ Markdown में बदलें

Parsing & Ingestionओपन सोर्स
भाषा
Python
$pip install 'markitdown[all]'
संक्षेप में

MarkItDown क्या है?

MarkItDown PDF, Office दस्तावेज़ और अन्य फ़ाइलों को LLM के लिए साफ़ Markdown में बदलें. यह Retrieval & Knowledge (RAG) टूल्स की Parsing & Ingestion श्रेणी में आता है; ओपन सोर्स है और Python में लिखा गया है। शुरू करने के लिए: pip से इंस्टॉल करें.

सारांश

MarkItDown, Microsoft की एक हल्की Python यूटिलिटी है, जो कई तरह की फ़ाइलों को Markdown में बदलती है। यह PDF, PowerPoint, Word, Excel, इमेज, ऑडियो, HTML, CSV/JSON/XML जैसे text formats, ZIP archives, EPubs और YouTube URLs को सपोर्ट करती है, और headings, lists, tables व links जैसी structure को बनाए रखती है।

यह दस्तावेज़ों को LLMs और text-analysis pipelines में डालने के लिए बनाई गई है, न कि इंसानों के पढ़ने के लिए उच्च-गुणवत्ता वाले रूपांतरण के लिए। Markdown, document की structure बनाए रखते हुए, plain text के काफ़ी करीब रहता है, और mainstream models इसे अच्छी तरह और token-efficient तरीके से संभालते हैं। यह प्रोजेक्ट खुद की तुलना textract से करता है, और structure को बनाए रखने पर ज़्यादा ज़ोर देता है।

यह web scraping और data extraction के क्षेत्र में normalization step के रूप में फ़िट बैठता है: मिली-जुली source फ़ाइलों को लेकर उन्हें एक ही, consistent text format में बदलें, जिसे आपके prompts और pipelines इस्तेमाल कर सकें। यह command-line tool के रूप में या Python library के रूप में चलता है।

यह क्या करता है

  • PDF, Word, PowerPoint, Excel, HTML और text formats (CSV, JSON, XML) को Markdown में बदलता है
  • इमेज (EXIF metadata और OCR), ऑडियो (metadata और speech transcription), EPubs, ZIP archives और YouTube URLs को संभालता है
  • Optional dependency groups (जैसे [pdf], [docx], [pptx]) से आप सिर्फ़ वही formats इंस्टॉल कर सकते हैं जिनकी आपको ज़रूरत है
  • file, -o output और piped stdin input के साथ Command-line interface
  • Third-party plugins सपोर्ट करता है, जिनमें embedded images की LLM-based OCR के लिए markitdown-ocr भी शामिल है
  • Higher-quality और structured extraction के लिए optional Azure Document Intelligence और Azure Content Understanding backends

शुरू करें

MarkItDown के लिए Python 3.10 या उससे ऊपर का वर्ज़न चाहिए; virtual environment का इस्तेमाल करने की सलाह दी जाती है। इसे pip से इंस्टॉल करें, फिर command line से या Python में फ़ाइलें बदलें।

pip से इंस्टॉल करें

सभी optional format dependencies के साथ MarkItDown इंस्टॉल करें। आप सिर्फ़ ज़रूरी groups भी इंस्टॉल कर सकते हैं, जैसे 'markitdown[pdf, docx, pptx]'।

bashbash
pip install 'markitdown[all]'

Command line से फ़ाइल बदलें

फ़ाइल का path दें और Markdown output को redirect करें, या output फ़ाइल सेट करने के लिए -o का इस्तेमाल करें।

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

Python से इस्तेमाल करें

MarkItDown instance बनाएं, फ़ाइल बदलें, और result के text_content से Markdown पढ़ें।

pythonpython
from markitdown import MarkItDown

md = MarkItDown()
result = md.convert("document_with_images.pdf")
print(result.text_content)

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • LLM prompts या RAG pipelines के लिए Markdown context के रूप में PDF, Word और PowerPoint दस्तावेज़ तैयार करना
  • विश्लेषण के लिए मिली-जुली फ़ाइलों के folder को एक ही, consistent text format में बदलना
  • data pipeline में spreadsheets, HTML pages या EPubs से text और structure निकालना
  • Downstream processing के लिए audio को transcribe करना या YouTube transcripts को Markdown में लाना

How MarkItDown compares

MarkItDown alongside other open-source parsing & ingestion tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
MarkItDown★ 199kPDF, Office दस्तावेज़ और अन्य फ़ाइलों को LLM के लिए साफ़ Markdown में बदलें
MinerU★ 84.7kPDF, Office फ़ाइल और स्कैन को RAG और LLM के लिए साफ़ Markdown या JSON में बदलें
Docling★ 71.3kPDF, Office फ़ाइलें और अन्य फ़ॉर्मेट को LLM-ready Markdown या JSON में बदलें
Marker★ 41.2kPDF और दस्तावेज़ों को Markdown, JSON या HTML में बदलें, टेबल और समीकरण जस के तस रहते हुए
OpenDataLoader PDF★ 30.4kAI-ready डेटा और ऑटोमेटेड एक्सेसिबिलिटी टैगिंग के लिए ओपन-सोर्स PDF पार्सर
Repomix★ 29.6kअपने पूरे codebase को एक ही AI-friendly फ़ाइल में पैक करें
Unstructured★ 15.8kओपन सोर्स preprocessing, जो अव्यवस्थित दस्तावेज़ों को LLM के लिए साफ़ elements में बदल देता है
LiteParse★ 13.6kRust core के साथ तेज़ लोकल डॉक्यूमेंट पार्सर — Markdown, JSON या text, bounding boxes सहित, बिना cloud के