|
| 1 | +# ⚡ MarkItDown Local Frontend |
| 2 | + |
| 3 | +**v0.42** — Convert documents, PDFs, Office files & more to Markdown — locally. |
| 4 | + |
| 5 | +A self-contained web app built on Microsoft's [MarkItDown](https://github.com/microsoft/markitdown) library. All conversion happens on your machine — no files or URLs are ever sent to an external server. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Features |
| 10 | + |
| 11 | +- **Drag-and-drop or browse** to upload files |
| 12 | +- **URL conversion** — paste a YouTube link or any web page URL |
| 13 | +- **Live Markdown preview** alongside the raw output |
| 14 | +- **Copy to clipboard** or **download as `.md`** |
| 15 | +- **Stats bar** — characters, words, lines, and estimated token range |
| 16 | +- **Quit button** — shuts down the server cleanly from the browser |
| 17 | + |
| 18 | +### Supported formats |
| 19 | + |
| 20 | +| Category | Formats | |
| 21 | +|---|---| |
| 22 | +| Documents | PDF, DOCX, PPTX, XLSX, XLS, EPUB | |
| 23 | +| Data | CSV, JSON, XML | |
| 24 | +| Web | HTML, YouTube URLs, web pages | |
| 25 | +| Archives | ZIP | |
| 26 | +| Images | JPG, PNG | |
| 27 | +| Audio | WAV, MP3 | |
| 28 | + |
| 29 | +**Max file size:** 100 MB |
| 30 | + |
| 31 | +--- |
| 32 | + |
| 33 | +## Option 1 — Run as a macOS App (recommended) |
| 34 | + |
| 35 | +A pre-built `MarkItDown.app` is included in `dist/`. No Python installation required. |
| 36 | + |
| 37 | +### Steps |
| 38 | + |
| 39 | +1. Download or clone this repository. |
| 40 | +2. Open `dist/` in Finder. |
| 41 | +3. **Right-click** `MarkItDown.app` → **Open** → click **Open** in the dialog. |
| 42 | + > This one-time step is required because the app is not signed with an Apple Developer ID. After the first launch you can double-click as normal. |
| 43 | +4. Your default browser opens automatically to `http://127.0.0.1:5001`. |
| 44 | +5. To quit, click the **Quit** button in the top-right corner of the UI. |
| 45 | + |
| 46 | +### Requirements |
| 47 | + |
| 48 | +- macOS 12 (Monterey) or later |
| 49 | +- Apple Silicon (arm64) or Intel Mac |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +## Option 2 — Run from Source (Python) |
| 54 | + |
| 55 | +Use this if you want to modify the app or the pre-built `.app` doesn't work on your system. |
| 56 | + |
| 57 | +### Requirements |
| 58 | + |
| 59 | +- macOS 12 or later (also works on Windows) |
| 60 | +- Python 3.10 or higher |
| 61 | + |
| 62 | +Check your Python version in Terminal: |
| 63 | +```bash |
| 64 | +python3 --version |
| 65 | +``` |
| 66 | + |
| 67 | +If you have 3.9 or lower, download the latest Python from [python.org](https://www.python.org/downloads/). |
| 68 | + |
| 69 | +### One-time setup (macOS) |
| 70 | + |
| 71 | +Open **Terminal** (`Cmd + Space` → type Terminal → press Enter) and run each command: |
| 72 | + |
| 73 | +```bash |
| 74 | +# 1. Navigate to the project folder |
| 75 | +cd /path/to/CC_Markdown |
| 76 | + |
| 77 | +# 2. Create a virtual environment |
| 78 | +python3 -m venv .venv |
| 79 | + |
| 80 | +# 3. Activate it (your prompt will show (.venv) when active) |
| 81 | +source .venv/bin/activate |
| 82 | + |
| 83 | +# 4. Install dependencies |
| 84 | +pip install "markitdown[all]" flask |
| 85 | +``` |
| 86 | + |
| 87 | +> **Tip:** If you see an Xcode prompt, click Install and wait for it to finish, then re-run the `pip install` command. |
| 88 | +
|
| 89 | +### Running the app |
| 90 | + |
| 91 | +```bash |
| 92 | +cd /path/to/CC_Markdown |
| 93 | +source .venv/bin/activate |
| 94 | +python app.py |
| 95 | +``` |
| 96 | + |
| 97 | +The app starts a local server and opens `http://127.0.0.1:5001` in your browser automatically. |
| 98 | + |
| 99 | +To stop, click the **Quit** button in the UI, or press `Control + C` in Terminal. |
| 100 | + |
| 101 | +### One-time setup (Windows) |
| 102 | + |
| 103 | +Open **Command Prompt** (`Win + R` → type `cmd` → Enter): |
| 104 | + |
| 105 | +```bat |
| 106 | +cd C:\path\to\CC_Markdown |
| 107 | +python -m venv .venv |
| 108 | +.venv\Scripts\activate |
| 109 | +pip install "markitdown[all]" flask |
| 110 | +``` |
| 111 | + |
| 112 | +> **Note:** If Python is not found, re-run the installer from [python.org](https://www.python.org/downloads/) and check **"Add Python to PATH"**. |
| 113 | +
|
| 114 | +Run: |
| 115 | +```bat |
| 116 | +python app.py |
| 117 | +``` |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +## Option 3 — Build the macOS App Yourself |
| 122 | + |
| 123 | +Use this to rebuild `MarkItDown.app` after making changes to `app.py`. |
| 124 | + |
| 125 | +### Additional requirement |
| 126 | + |
| 127 | +```bash |
| 128 | +pip install pyinstaller |
| 129 | +``` |
| 130 | + |
| 131 | +### Build |
| 132 | + |
| 133 | +```bash |
| 134 | +bash build.sh |
| 135 | +``` |
| 136 | + |
| 137 | +The script will: |
| 138 | +1. Kill any running instance on port 5001 |
| 139 | +2. Clean previous build artifacts |
| 140 | +3. Run PyInstaller with `MarkItDown.spec` |
| 141 | +4. Ad-hoc sign the `.app` bundle |
| 142 | +5. Report the bundle size and location |
| 143 | + |
| 144 | +Output: `dist/MarkItDown.app` (~166 MB, all dependencies bundled) |
| 145 | + |
| 146 | +> **First launch on another Mac:** Right-click → Open → Open (one-time Gatekeeper bypass). This is expected for apps without an Apple Developer ID. |
| 147 | +
|
| 148 | +--- |
| 149 | + |
| 150 | +## Troubleshooting |
| 151 | + |
| 152 | +| Problem | Fix | |
| 153 | +|---|---| |
| 154 | +| "Port 5001 already in use" | Run `lsof -ti :5001 \| xargs kill -9` then restart | |
| 155 | +| App won't open on another Mac | Right-click → Open → Open (one-time Gatekeeper step) | |
| 156 | +| "command not found: pip" | Use `python3 -m pip install ...` instead | |
| 157 | +| Xcode prompt on macOS | Click Install, wait for it to finish, re-run `pip install` | |
| 158 | +| Conversion returns empty output | Check the error box in the UI for the full Python traceback | |
| 159 | + |
| 160 | +--- |
| 161 | + |
| 162 | +## Project structure |
| 163 | + |
| 164 | +``` |
| 165 | +CC_Markdown/ |
| 166 | +├── app.py # Single-file Flask app (HTML/CSS/JS embedded) |
| 167 | +├── MarkItDown.spec # PyInstaller build configuration |
| 168 | +├── build.sh # Build script (clean → bundle → sign) |
| 169 | +├── dist/ |
| 170 | +│ └── MarkItDown.app # Pre-built macOS application |
| 171 | +└── .venv/ # Python virtual environment (not committed) |
| 172 | +``` |
| 173 | + |
| 174 | +--- |
| 175 | + |
| 176 | +## License |
| 177 | + |
| 178 | +MIT — see [LICENSE](LICENSE). |
| 179 | + |
| 180 | +Built on [Microsoft MarkItDown](https://github.com/microsoft/markitdown) (MIT). |
0 commit comments