MarkItDown Flow
approvedby greatgc-flow
Instantly convert PDFs, Office documents, images, and audio into beautifully structured Markdown. Powered by Microsoft MarkItDown with smart AI fallback phases for flawless formatting. - This plugin has not been manually reviewed by Obsidian staff.
๐ MarkItDown Flow (Enterprise Edition)
MarkItDown Flow is a powerful unified engine and Obsidian plugin that flawlessly converts data of any formatโimages, PDFs, audio, video, and archives (ZIP)โinto pristine Markdown.
Going beyond simple text extraction, it guarantees zero-loss Markdown conversion through a 4-Phase Intelligent Fallback Pipeline (Offline OCR โ AI Vision โ Azure DocIntel โ Azure Content Understanding).
โจ Key Features
- ๐ด Robust Offline Engine (Phase 1): Fast and cost-free offline text extraction utilizing ensemble OCR such as Tesseract and EasyOCR.
- ๐ค Smart AI Vision Fallback (Phase 2): Automatically routes to OpenAI (GPT-4o), Anthropic (Claude), and Google (Gemini) vision models when offline extraction fails or encounters complex images.
- ๐ข Azure Enterprise Integration (Phase 3 & 4): Perfectly structures complex PDF layouts and multimedia via Azure Document Intelligence (4.0 GA) and Azure Content Understanding.
- ๐ฆ Full CLI Support: Can be used independently as a Python CLI environment anywhere, even without Obsidian.
- ๐ก๏ธ Ironclad Security: API keys are injected via environment variables (
process.env) rather than CLI arguments, ensuring they are never exposed to logs or process monitoring tools. - ๐ Multilingual & Timezone Support: Supports 8 languages via the
output_langsetting and automatically records document metadata aligned to your local timezone (timezone_offset). - ๐๏ธ Physical Inline Asset Extraction: Physically extracts Base64 images hidden inside Markdown into an independent folder and maps the paths automatically.
๐ ๏ธ User Manual: Installation & Usage
1. Using as an Obsidian Plugin
Installation:
- Clone this repository or download the released files:
main.js,manifest.json,styles.css, and theengine/folder. - Create the
<your-vault>/.obsidian/plugins/markitdown-flow/folder inside your Obsidian vault and place all files there. - In Obsidian, go to Settings โ Community plugins โ enable MarkItDown Flow.
- In the plugin settings screen, set your
Python pathand install the required packages (markitdown,Pillow,geopy, etc.).
Usage:
- Ribbon Icon: Click to convert a desired file.
- Command Palette:
Convert file to Markdown(Single file conversion)Convert folder to Markdown(Convert an entire folder)
- Drag & Drop: Dragging and dropping an image or PDF file into the editor will automatically convert and insert it into your active note!
2. Using as a CLI (Standalone Python Script)
You can use the powerful conversion engine independently in your terminal (CLI) without opening Obsidian.
Install Required Packages:
cd engine/src
pip install markitdown Pillow geopy
# Optional (if using AI)
pip install openai anthropic google-genai azure-ai-documentintelligence
CLI Usage Examples:
# Basic file conversion (Output saved to a file)
python markitdown_wrapper.py --input "sample.pdf" --output "result.md"
# Extract assets (e.g., images) as physical files
python markitdown_wrapper.py --input "sample.pdf" --output "result.md" --extract-assets --asset-dir "assets/"
# Pass additional options (as a JSON string)
python markitdown_wrapper.py --input "sample.png" --output "result.md" --plugin-args '{"output_lang": "en", "exhaustive_mode": true}'
(Security: Do NOT put API keys in --plugin-args! Set the DOCINTEL_CREDENTIAL and LLM_API_KEY environment variables; the Python engine will detect them and operate safely.)
โ๏ธ Detailed Options (Plugin Args & Options)
These are the core options that can be passed via the settings screen or CLI --plugin-args.
| Option Name | Type | Default | Description |
|---|---|---|---|
output_lang | string | "en" | Output UI language (Supported: en, ko, ja, zh, hi, fr, es, ar) |
timezone_offset | float | null | Timezone for metadata (e.g., 9.0 for Korea). Applies system local time if unset. |
exhaustive_mode | boolean | false | Forces execution of all pipelines (AI, DocIntel, etc.) even if the offline phase succeeds. |
extract_archives | boolean | false | Recursively extracts ZIP and TAR files, converting all contents to Markdown. |
enable_captions | boolean | false | Automatically appends detailed caption generation instructions to AI prompts. |
max_recursion_depth | int | 5 | Maximum depth limit for recursive extraction of archives. |
docintel_target_mimes | list | ["application/pdf", ...] | Target MIME types processed by Azure DocIntel. |
ai_target_mimes | list | ["image/", ...] | Target MIME types processed by LLM Vision AI. |
pdf_layout | boolean | true | Preserves layout formatting during PDF conversion (MarkItDown core option). |
(Note: In the plugin UI, AI model API Keys and Endpoints are securely collected via Password fields.)
๐ Security & Privacy
NEVER hardcode API keys in the source code or GitHub!
MarkItDown Flow keeps user API keys strictly local (data.json). When invoking the subprocess, it passes them via Operating System Environment Variables (Env Vars) instead of Command Line Arguments (CLI), structurally preventing leaks to hackers or process monitoring tools.
๐จโ๐ป Development & Contributing
git clone https://github.com/greatgc-flow/MarkItDown-Flow.git
cd MarkItDown-Flow
npm install
npm run build
๐ License
This project is licensed under the MIT License. See the LICENSE file for details. The internal core engine of this project utilizes the Microsoft MarkItDown library.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.