Repository 指南 · 入門 · v2
microsoft / markitdown · 入門
一個 Python repository,平台描述稱它為檔案轉 Markdown 的轉換工具。它採用 MIT 授權,拆成四個套件,每個套件都有一組來自 pyproject.toml 的依賴記錄。列出的非測試 __main__ 守衛中,有一個(markitdown-mcp)會呼叫 main();其他列出的守衛則是執行測試。本分析沒有驗證安裝或執行指令。
- 原始 repository
- microsoft/markitdown
- 授權
- MIT · 開源授權
- 分析的版本 · 最後驗證
- ed178952a6672abdfd35b5f9e76a80b6cefc086e ·
本頁中文由負責的 AI 編輯依英文正式版本 v2 翻譯;程式碼名稱、路徑、行號與數字都經確定性檢查,與英文版一致。陳述與依據表保留英文原文,因為那是獨立驗證者核對過的紀錄。看英文原文
microsoft/markitdown 入門:manifest 與進入點
本頁用語說明
- Entrypoint record(進入點記錄)
- 分析器標記為「程式可能從這裡開始執行」的檔案。附有 __main__ guard 摘錄時,表示檔案裡有 if __name__ == "__main__": 區塊,摘錄顯示它呼叫了什麼;沒有摘錄時,只是依檔名判斷。
- Bounded static execution path(有界靜態執行路徑)
- 不執行程式、直接從原始碼重建出的呼叫鏈,走到固定步數就停。它說明在紙面上能追到多遠,不代表實際執行時會發生什麼。
- Unresolved boundary(未解析邊界)
- 靜態路徑停下的地方:下一個呼叫進入外部函式庫,或不執行就無法確定。這是本次分析的邊界,不是 repository 的缺陷。
- Static relations(靜態關係)
- 在原始碼中找到的呼叫與 import。「external or unresolved」表示指向分析範圍以外。
- Module role(模組角色)
- 分析器依呼叫進出次數推論的檔案標籤(例如 core、entry/orchestration、leaf)。它描述的是在呼叫圖中的位置,不是作者的設計意圖。
- Test-like files(類測試檔案)
- 名稱或位置看起來像測試的檔案。本次分析只計數,不執行。
- Observed · inferred · author-claimed · unresolved
- 每句話的依據:直接讀自分析的檔案;由分析器從檔案推論;repository 作者自述(metadata、README);或本次分析無法確定。
- Verified(已驗證)
- 本頁有兩種用法。在分析器的記錄裡(「verified provenance」「verified entrypoint」),它表示這筆記錄是直接從分析的檔案讀到的,也就是本指南所說的 observed;以進入點來說,就是檔案裡確實有 __main__ guard 的文字。分析器在 2026-10-04 修正後,只有 cli.py、main.py 這類像進入點的檔名、沒有 guard 的檔案,會記為 inferred(推測);在那之前分析的指南仍把這類檔案標成 verified,它依然只是對檔案用途的推測。它不代表程式被執行或測試過。「最後驗證」是這份指南最後一次通過本實驗室檢查的日期,檢查對象是所標示版本的分析記錄,不是對 repository 本身的審查。
你正在看的是什麼
這個 repository 的 GitHub 描述把它說成一個將檔案與 Office 文件轉換成 Markdown 的 Python 工具。這是專案自己的說法,不是本分析檢查過的內容。
- 主要語言:Python。語言位元組統計約為 799 kB 的 Python,以及約 1.3 kB 的 Dockerfile。
- 授權:MIT,根目錄有
LICENSE檔案。 - 平台上最新的 release:v0.1.9,發布於 2026-10-21。
- 收集資料時的 star 數:195,516。這是熱門程度的數字,不是品質訊號。
分析器計算出 197 個檔案,其中 112 個類似測試檔,另有 4 個 manifest 檔案。分析器自己的摘要把這個結構解讀為一個以 packages/ 目錄為中心組織、並附有測試的 Python 專案。
專案對自己的描述
平台上的主題標籤是 autogen、autogen-extension、langchain、markdown、microsoft-office、openai 和 pdf。這些標籤是設定在 repository 上的,本身並不能說明程式碼中實際有哪些整合。首頁欄位是空的。
README 文字只透過逐行擷取進入本分析。因此,其中關於範圍或安全性的任何說法,仍然是專案自己的說法。
它需要什麼
依賴記錄來自四個 pyproject.toml 檔案,packages/ 底下每個套件各一個:
- markitdown:執行期依賴
beautifulsoup4、requests、certifi(>=2026.10.19)、markdownify、magika(>=0.6.1,<2)、charset-normalizer、defusedxml。選用依賴:python-pptx、mammoth、pandas、openpyxl、xlrd、lxml、pdfminer.six、pdfplumber、olefile、pydub、SpeechRecognition、youtube-transcript-api,以及三個azure-*套件。 - markitdown-mcp:執行期依賴
mcp(>=2.1.1,<3.0.0)與markitdown(>=0.1.9,<0.2.0)。 - markitdown-ocr:執行期依賴
markitdown(>=0.1.9,<0.2.0)、pdfminer.six、pdfplumber、PyMuPDF、mammoth、python-docx、python-pptx、pandas、openpyxl、Pillow。選用依賴:openai(>=1.0.0)。 - markitdown-sample-plugin:執行期依賴
markitdown(>=0.1.0a1)與striprtf。
markitdown manifest 中的選用依賴名稱被記錄了不只一次。它們屬於哪些選用群組,目前無法確定。版本限制依原文記錄。setup.py、setup.cfg、Pipfile 和 lock 檔案不會被解析。
它如何啟動
packages/markitdown-mcp/src/markitdown_mcp/__main__.py 帶有一個 __main__ 守衛,其主體會呼叫 main()。
其他每個列出的守衛,都位於某個套件 tests/ 目錄下的測試檔中。其中大多數會把該檔案傳給 pytest.main。少數會直接呼叫測試函式,或 import 測試向量。分析器總共回報 24 筆進入點記錄,這裡列出其中 20 筆。
packages/markitdown/src/markitdown/__main__.py 被標記為可能的進入點,但沒有列出它的守衛記錄,因此它如何啟動無法確定。
分析器回報 155 條有界執行路徑;列出的有 5 條,全部來自 markitdown-mcp 的 __main__.py。其中三條經過本地的 main,停在未解析的邊界 argparse.ArgumentParser 和 parser.add_argument。另外兩條從模組層級出發,停在 logging.getLogger 和 MCPServer,沒有經過 main。
這些記錄以外的執行期行為無法確定。這包括可用的命令列選項、伺服器做什麼,以及轉換實際上如何執行。
先從哪裡看
分析器把 README.md 和 LICENSE 標記為專案層級的重要檔案。它另外把五個檔案標記為可能的進入點:markitdown-mcp 與 markitdown 的 __main__.py 檔案,以及 test_stdio_protocols.py、test_sample_plugin.py 和 test_cli_misc.py。
它的學習路徑主張暗示這樣的順序:先從 manifest 和重要符號開始,追蹤有界執行路徑,然後在修改程式碼之前檢查未解析的邊界。
它的修改指引主張指向 packages/markitdown/tests/test_cli_vectors.py 作為起點,並要求手動檢查下游影響。那個檔案是測試檔,不是函式庫原始碼。
頂層結構:197 個檔案中有 181 個在 packages/。根目錄有 10 個,.github 有 5 個,.devcontainer 有 1 個。
專案有測試。分析器計算出 112 個類似測試的檔案。進入點記錄顯示 markitdown、markitdown-mcp 和 markitdown-sample-plugin 套件中有測試目錄。
本分析無法告訴你的事
- 安裝、建置與執行指令都未驗證。
- 依賴解析涵蓋 requirements 檔案、package.json 和 pyproject.toml 的表格。setup.py、setup.cfg、Pipfile 和 lock 檔案不會被解析。
- README 內容是逐行擷取的,仍屬於作者的說法。
- 本分析是靜態且有界的。反射、動態 import、框架接線和動態分派都不會被解析。非常大、經過壓縮(minified)或 vendored 的檔案會列入清單,但不會被解析。
分析資料中也有兩處不一致:
- 分析器的一條教學主張說沒有可用的有界執行路徑,但卻回報了 155 條路徑,並列出其中五條。
- 分析器的摘要把 markitdown-mcp 的
__main__.py當作主要起點,而另一條教學主張則指向packages/markitdown/tests/test_cli_vectors.py。
這次分析無法確定的事
這些是撰寫模型對分析記錄自己的說明。lim_3、exec_* 或 claim_… 這類識別碼指的是那次分析裡的記錄;陳述與依據表引用的也是同一批記錄。
- 分析器在這次執行的限制記錄中表示,pyproject.toml 中的 PEP 621 依賴與選用依賴會被解析;本文依循該記錄。
- packages/markitdown/pyproject.toml 的選用依賴記錄在相同的行重複出現名稱(例如 pandas 出現三次,azure-identity 也出現三次);選用群組名稱不在分析資料中。
- 任何依賴記錄中都沒有出現 Python 版本需求,因此支援的 Python 版本無法確定。
- 檔案清單和語言統計包含 Dockerfile 內容,但沒有任何依賴記錄來自 Dockerfile,分析資料中也沒有描述它們的內容。
- 24 筆進入點記錄中有 4 筆未列出;packages/markitdown/src/markitdown/__main__.py 是否有守衛,以及它呼叫什麼,無法確定。
- 分析器回報有 5812 個靜態關係仍屬外部或未解析。
- 測試樣本包含 markitdown-ocr 測試資料下的 .docx 資料檔,因此 112 這個類似測試的檔案數量可能包含 fixture,不只是測試程式碼。
- 這些套件是否有任何一個發布在套件 registry 上,或提供有文件說明的命令列介面,分析資料無法確定。
陳述與依據 — 36 條陳述,36 條經獨立驗證者確認(英文原文)
Every substantive statement above is a claim bound to grounding IDs of the analyzed revision. Global grounding IDs are namespaced by the analysis run.
| Claim | Epistemic status | Verifier | Grounding (global IDs) |
|---|---|---|---|
| c1 The repository's platform description presents it as a Python tool for converting files and office documents to Markdown; this is the project's own account and was not checked by this analysis. | author_claimed | supported | analysis_5d9c9ae9a129bff5:meta_description |
| c2 Platform metadata gives Python as the primary language; language byte counts are 798912 bytes of Python and 1267 bytes of Dockerfile. | observed | supported | analysis_5d9c9ae9a129bff5:meta_primary_language, analysis_5d9c9ae9a129bff5:meta_language_bytes |
| c3 The license is recorded as MIT, and LICENSE is a project-level important file at the repository root. | observed | supported | analysis_5d9c9ae9a129bff5:meta_license, analysis_5d9c9ae9a129bff5:important_2 |
| c4 The latest platform release is v0.1.9, published 2026-10-21. | observed | supported | analysis_5d9c9ae9a129bff5:meta_latest_release |
| c5 Platform metadata records 195516 stargazers at collection time; this is a popularity count, not a quality signal. | observed | supported | analysis_5d9c9ae9a129bff5:meta_stars |
| c6 The analyzer counts 197 files, 112 test-like files and 4 manifest files, and its summary reads the repository as a Python project organised around packages, with tests. | inferred | supported | analysis_5d9c9ae9a129bff5:summary_repository |
| c7 The repository's topic labels are autogen, autogen-extension, langchain, markdown, microsoft-office, openai and pdf; these labels do not by themselves show which integrations exist in code. | author_claimed | supported | analysis_5d9c9ae9a129bff5:meta_topics |
| c8 The platform homepage field for the repository is empty. | author_claimed | supported | analysis_5d9c9ae9a129bff5:meta_homepage |
| c9 README claim extraction is line-based and every README claim remains author-claimed at best. | observed | supported | analysis_5d9c9ae9a129bff5:lim_4a |
| c10 Dependency records come from four pyproject.toml files: packages/markitdown, packages/markitdown-mcp, packages/markitdown-ocr and packages/markitdown-sample-plugin. | observed | supported | analysis_5d9c9ae9a129bff5:dep_1, analysis_5d9c9ae9a129bff5:dep_3, analysis_5d9c9ae9a129bff5:dep_14, analysis_5d9c9ae9a129bff5:dep_16 |
| c11 The markitdown manifest lists runtime dependencies beautifulsoup4, requests, certifi (>=2026.10.19), markdownify, magika (>=0.6.1,<2), charset-normalizer and defusedxml. | observed | supported | analysis_5d9c9ae9a129bff5:dep_16, analysis_5d9c9ae9a129bff5:dep_17, analysis_5d9c9ae9a129bff5:dep_18, analysis_5d9c9ae9a129bff5:dep_19, analysis_5d9c9ae9a129bff5:dep_20, analysis_5d9c9ae9a129bff5:dep_21, analysis_5d9c9ae9a129bff5:dep_22 |
| c12 The markitdown manifest lists optional dependencies python-pptx, mammoth, pandas, openpyxl, xlrd, lxml, pdfminer.six, pdfplumber, olefile, pydub, SpeechRecognition, youtube-transcript-api, azure-ai-documentintelligence, azure-ai-contentunderstanding and azure-identity. | observed | supported | analysis_5d9c9ae9a129bff5:dep_23, analysis_5d9c9ae9a129bff5:dep_24, analysis_5d9c9ae9a129bff5:dep_25, analysis_5d9c9ae9a129bff5:dep_26, analysis_5d9c9ae9a129bff5:dep_27, analysis_5d9c9ae9a129bff5:dep_28, analysis_5d9c9ae9a129bff5:dep_29, analysis_5d9c9ae9a129bff5:dep_30, analysis_5d9c9ae9a129bff5:dep_31, analysis_5d9c9ae9a129bff5:dep_32, analysis_5d9c9ae9a129bff5:dep_33, analysis_5d9c9ae9a129bff5:dep_34, analysis_5d9c9ae9a129bff5:dep_35, analysis_5d9c9ae9a129bff5:dep_36, analysis_5d9c9ae9a129bff5:dep_37 |
| c13 The markitdown-mcp manifest lists runtime dependencies mcp (>=2.1.1,<3.0.0) and markitdown (>=0.1.9,<0.2.0). | observed | supported | analysis_5d9c9ae9a129bff5:dep_1, analysis_5d9c9ae9a129bff5:dep_2 |
| c14 The markitdown-ocr manifest lists runtime markitdown (>=0.1.9,<0.2.0), pdfminer.six, pdfplumber, PyMuPDF, mammoth, python-docx, python-pptx, pandas, openpyxl and Pillow, plus optional openai (>=1.0.0). | observed | supported | analysis_5d9c9ae9a129bff5:dep_3, analysis_5d9c9ae9a129bff5:dep_4, analysis_5d9c9ae9a129bff5:dep_5, analysis_5d9c9ae9a129bff5:dep_6, analysis_5d9c9ae9a129bff5:dep_7, analysis_5d9c9ae9a129bff5:dep_8, analysis_5d9c9ae9a129bff5:dep_9, analysis_5d9c9ae9a129bff5:dep_10, analysis_5d9c9ae9a129bff5:dep_11, analysis_5d9c9ae9a129bff5:dep_12, analysis_5d9c9ae9a129bff5:dep_13 |
| c15 The markitdown-sample-plugin manifest lists runtime dependencies markitdown (>=0.1.0a1) and striprtf. | observed | supported | analysis_5d9c9ae9a129bff5:dep_14, analysis_5d9c9ae9a129bff5:dep_15 |
| c16 Optional dependency names in the markitdown manifest are recorded more than once at the same lines; which optional groups they belong to is not established by the packet. | unresolved | supported | analysis_5d9c9ae9a129bff5:dep_38, analysis_5d9c9ae9a129bff5:dep_39, analysis_5d9c9ae9a129bff5:dep_40, analysis_5d9c9ae9a129bff5:dep_41, analysis_5d9c9ae9a129bff5:dep_42, analysis_5d9c9ae9a129bff5:dep_43, analysis_5d9c9ae9a129bff5:dep_44, analysis_5d9c9ae9a129bff5:dep_45, analysis_5d9c9ae9a129bff5:dep_46, analysis_5d9c9ae9a129bff5:dep_47, analysis_5d9c9ae9a129bff5:dep_48, analysis_5d9c9ae9a129bff5:dep_49, analysis_5d9c9ae9a129bff5:dep_50, analysis_5d9c9ae9a129bff5:dep_51, analysis_5d9c9ae9a129bff5:dep_52, analysis_5d9c9ae9a129bff5:dep_53, analysis_5d9c9ae9a129bff5:dep_54 |
| c17 Version constraints are recorded as written; setup.py, setup.cfg, Pipfile and lock files are not parsed. | observed | supported | analysis_5d9c9ae9a129bff5:lim_3a |
| c18 packages/markitdown-mcp/src/markitdown_mcp/__main__.py has a __main__ guard whose body calls main(). | observed | supported | analysis_5d9c9ae9a129bff5:py_entry_2f852a8015d4 |
| c19 Every other listed __main__ guard sits in a test file under a package tests directory; most pass the file to pytest.main, while test_sample_plugin.py, test_cli_vectors.py and test_module_vectors.py call test functions or import test vectors. | observed | supported | analysis_5d9c9ae9a129bff5:py_entry_1fa8ac31a8f1, analysis_5d9c9ae9a129bff5:py_entry_a63fdf323f3b, analysis_5d9c9ae9a129bff5:py_entry_f44307e3b0be, analysis_5d9c9ae9a129bff5:py_entry_007b88c947c9, analysis_5d9c9ae9a129bff5:py_entry_48d5677c0b8c, analysis_5d9c9ae9a129bff5:py_entry_6da5faf654d3, analysis_5d9c9ae9a129bff5:py_entry_e1644548438f, analysis_5d9c9ae9a129bff5:py_entry_fd2581a2a85a, analysis_5d9c9ae9a129bff5:py_entry_c1e9a0696ede, analysis_5d9c9ae9a129bff5:py_entry_4001ed8b5544, analysis_5d9c9ae9a129bff5:py_entry_2eddfb03d1cb, analysis_5d9c9ae9a129bff5:py_entry_791d98438517, analysis_5d9c9ae9a129bff5:py_entry_3c032b18438d, analysis_5d9c9ae9a129bff5:py_entry_32796e5c789a, analysis_5d9c9ae9a129bff5:py_entry_d48046c8aa24, analysis_5d9c9ae9a129bff5:py_entry_f19b18e9138b, analysis_5d9c9ae9a129bff5:py_entry_de1243d2bd26, analysis_5d9c9ae9a129bff5:py_entry_fc521ad126e1, analysis_5d9c9ae9a129bff5:py_entry_1f6c94e0f30f |
| c20 The analyzer reports 24 entrypoint records in total; 20 are listed here, so statements about guards are scoped to the listed records. | inferred | supported | analysis_5d9c9ae9a129bff5:architecture_reconstruction |
| c21 packages/markitdown/src/markitdown/__main__.py is flagged as important because it is likely an entrypoint, but no guard record for it is listed, so how it starts is not established. | unresolved | supported | analysis_5d9c9ae9a129bff5:important_6 |
| c22 The analyzer reports 155 bounded execution paths; 5 are listed, all from the markitdown-mcp __main__.py. Three reach the local main and stop at argparse.ArgumentParser or parser.add_argument; two stop directly at logging.getLogger and MCPServer from module level. | inferred | supported | analysis_5d9c9ae9a129bff5:summary_repository, analysis_5d9c9ae9a129bff5:exec_67998e701fae, analysis_5d9c9ae9a129bff5:exec_b68e1f5a7c8a, analysis_5d9c9ae9a129bff5:exec_11e5ff5e359f, analysis_5d9c9ae9a129bff5:exec_51ee1388edd7, analysis_5d9c9ae9a129bff5:exec_b64608cd49a8 |
| c23 Runtime behaviour beyond these records, such as available command-line options, what the server does or how conversions run, is not established by this static analysis. | unresolved | supported | analysis_5d9c9ae9a129bff5:lim_1, analysis_5d9c9ae9a129bff5:lim_2 |
| c24 README.md and LICENSE are classified as project-level important files. | observed | supported | analysis_5d9c9ae9a129bff5:important_1, analysis_5d9c9ae9a129bff5:important_2 |
| c25 Five files are classified as important because they are likely entrypoints: the markitdown-mcp and markitdown __main__.py files, test_stdio_protocols.py, test_sample_plugin.py and test_cli_misc.py. | observed | supported | analysis_5d9c9ae9a129bff5:important_3, analysis_5d9c9ae9a129bff5:important_4, analysis_5d9c9ae9a129bff5:important_5, analysis_5d9c9ae9a129bff5:important_6, analysis_5d9c9ae9a129bff5:important_7 |
| c26 The analyzer's learning-path claim suggests starting with manifests and important symbols, then tracing the bounded execution path and inspecting unresolved boundaries before changing code. | inferred | supported | analysis_5d9c9ae9a129bff5:claim_e56db45165bf |
| c27 The analyzer's modify-guide claim points to packages/markitdown/tests/test_cli_vectors.py as the place to begin and asks for manual checking of downstream effects; that file is a test file, not library source. | inferred | supported | analysis_5d9c9ae9a129bff5:claim_cb8d18fd5293, analysis_5d9c9ae9a129bff5:py_entry_007b88c947c9 |
| c28 Top-level layout: packages/ holds 181 of 197 files, the root 10, .github 5 and .devcontainer 1. | inferred | supported | analysis_5d9c9ae9a129bff5:summary_repository |
| c29 The analyzer counts 112 test-like files in the repository. | inferred | supported | analysis_5d9c9ae9a129bff5:summary_repository |
| c30 Entrypoint records show test directories in the markitdown, markitdown-mcp and markitdown-sample-plugin packages. | observed | supported | analysis_5d9c9ae9a129bff5:py_entry_1fa8ac31a8f1, analysis_5d9c9ae9a129bff5:py_entry_a63fdf323f3b, analysis_5d9c9ae9a129bff5:py_entry_f44307e3b0be |
| c31 Install, run and build inference is partial, and installation commands are not verified by this analysis. | observed | supported | analysis_5d9c9ae9a129bff5:lim_2 |
| c32 Dependency records come from requirements files, package.json and pyproject.toml tables; setup.py, setup.cfg, Pipfile and lock files are not parsed. | observed | supported | analysis_5d9c9ae9a129bff5:lim_3a |
| c33 README content is extracted line by line and stays author-claimed. | observed | supported | analysis_5d9c9ae9a129bff5:lim_4a |
| c34 The analysis is static and bounded: reflection, dynamic imports, framework wiring and dynamic dispatch are not resolved, and files over 400 kB, minified bundles and vendored directories are inventoried but not parsed. | observed | supported | analysis_5d9c9ae9a129bff5:lim_1, analysis_5d9c9ae9a129bff5:lim_6 |
| c35 One analyzer teaching claim says no bounded execution path is available, yet the analyzer reports 155 bounded paths and five are listed. | inferred | supported | analysis_5d9c9ae9a129bff5:claim_4d30ade3e21e, analysis_5d9c9ae9a129bff5:summary_repository, analysis_5d9c9ae9a129bff5:exec_67998e701fae |
| c36 The analyzer's summary names the markitdown-mcp __main__.py as the main starting place, while another teaching claim names packages/markitdown/tests/test_cli_vectors.py as a detected starting point. | inferred | supported | analysis_5d9c9ae9a129bff5:summary_repository, analysis_5d9c9ae9a129bff5:claim_34d2322830c1 |
來源、權利與說明 · attribution-license-templates/v0.1
權利聲明。原始 repository 託管於 GitHub。其原始碼、文件、名稱、媒體與相關素材的權利,仍屬各自的作者、貢獻者與其他權利人所有,並受該 repository 的授權條款約束。
Original repository hosted on GitHub. Repository source code, documentation, names, media, and related project materials remain subject to the rights of their respective authors, contributors, and other rights holders and to applicable repository license terms.
平台聲明。GitHub 是所連結 repository 的來源託管平台。GitHub 與相關標誌為 GitHub, Inc. 的商標。除非另有明確說明,EVEMISS Technology 與 GitHub 之間沒有隸屬或背書關係。
GitHub is the source hosting platform for the linked repository. GitHub and related marks are trademarks of GitHub, Inc. EVEMISS Technology is not affiliated with or endorsed by GitHub unless explicitly stated otherwise.
這一頁怎麼來的。本頁由對應版本的 repository 分析與 AI 輔助的編輯工具產生。技術陳述綁定所分析的版本;原始 repository 更新後,可能重新驗證。
This page was produced using revision-aware repository analysis and AI-assisted editorial tooling. Technical claims are tied to the analyzed repository revision and may be revalidated when the source repository changes.
本頁包含 AI 輔助分析,並經 EVEMISS Technology 人工與 AI 協力審閱。 · 回報權利疑慮 · 回到概覽