mq-conv turns PDFs, Office docs and other formats into clean, structure-preserving Markdown. It runs locally: no API keys, no network, no Python runtime. It is built to feed mq, the jq-like query tool for Markdown.
- Layout-aware PDF parsing: columns, headings, lists, ruled and borderless tables, CJK fonts
- Many formats: documents, markup, spreadsheets, data, media, archives
- Built-in mq queries, token budgeting and page selection
- Image extraction and OCR, Any input to docx, HTML, EPUB and more
- Parallel conversion, per-format feature flags and a WebAssembly build
curl -fsSL https://raw.githubusercontent.com/harehare/mq-conv/main/bin/install.sh | bashor with Cargo:
cargo install mq-conv
cargo binstall mq-conv # prebuilt releasemq-conv report.pdf # convert to stdout
cat notes.org | mq-conv --format org # stdin
mq-conv reports/*.pdf --output-dir ./out # many files, one .md each
mq-conv report.pdf --pages 3-5 # selected pages only
mq-conv report.pdf -q '.h2' # print what an mq query selects
mq-conv book.pdf --max-tokens 4000 # prompt-sized chunk, with a resume cursor
mq-conv report.pdf --extract-images ./img # keep embedded images
mq conv document.docx | mq -A 'section::section("Summary")' # pipe into mq- Quick Start and Install
- Guide: formats, queries, tokens, pages, images and OCR
- CLI, feature flags and WebAssembly
MIT