程式碼對照

Python 源碼逐函數講解——每個函數一個收縮塊(signature + 中文用途 + 關鍵邏輯)
語料:packages/markitdown/src/(核心)+ markitdown-mcp + markitdown-ocr + markitdown-sample-plugin · 對齊 fd239d5
🚀 MarkItDown 類別 _markitdown.py 註冊、5 個 convert_* 方法、_convert 調度核心、StreamInfo 猜測、外掛載入。 ⌨️ __main__.py CLI 層 argparse 全部旗標的解析、StreamInfo 提示、stdin/stdout 處理。 🧱 _base_converter.py Converter 協定 DocumentConverter 抽象父類 + DocumentConverterResult 結果物件。 📇 _stream_info / _uri_utils / _exceptions 線索卡與例外 StreamInfo、data:/file: URI 解析、例外層。 🧩 converters/ 概覽 協定實作 + 文字家族 accepts/convert 實作範例:PlainText、Html、Csv、iPython、_markdownify。 📊 docx / xlsx / pptx Office 轉換器 mammoth 管線、OMML→LaTeX 前處理、pandas 表格、python-pptx 圖片/表格。 📄 _pdf_converter.py PDF 轉換器 pdfminer/pdfplumber 分工、masterformat 編號合併、表格抽取。 🌐 youtube/wikipedia/rss/zip/epub/outlook 網頁與封裝家族 專用網址 converter、ZIP 遞迴、EPUB spine、Outlook .msg。 🎵 image/audio + 工具 媒體家族 exiftool_metadata、llm_caption、transcribe_audio 與依賴式輸出。 ☁️ _doc_intel / _cu Azure 雲端轉換器 Document Intelligence、Content Understanding 的 analyzer 路由與型別偵測。 🔗 markitdown-mcp 套件 MCP Server 源碼 convert_to_markdown 工具、STDIO/HTTP/SSE 三種 transport。 🖼️ markitdown-ocr + sample-plugin OCR 外掛套件 LLMVisionOCRService、priority -1.0 攔截、RtfConverter 開發範本。