Skip to main content

convert-docs

Convert documents (pdf, docx, pptx, xlsx, and more) to Markdown via markitdown. Point it at a folder and it recursively converts everything, mirroring the structure into a destination folder; point it at a single file and it converts just that file.

Install

Requires Python 3.10+.

uv tool install convert-docs

Don't have uv? Install it first:

curl -LsSf https://astral.sh/uv/install.sh | sh   # macOS / Linux
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"   # Windows

Or skip uv entirely and use pip: pip install convert-docs

Usage

Run with no flags for an interactive prompt (asks for source, then destination):

convert-docs

Tip (macOS): select a file or folder in Finder and press Option+Command+C to copy its full path, then paste it into the prompt.

Pointing it at a single file converts just that file, writing the .md next to it by default. To use a different output name, append a comma and the new name at the source prompt: ~/Downloads/Report.pdf, quarterly-summary writes quarterly-summary.md.

Or pass flags to skip the prompts:

convert-docs -s ~/Documents/Reports -o ~/Documents/Reports_MD
convert-docs -e pdf,docx        # restrict which extensions get converted
convert-docs -f                 # force re-conversion, ignoring the up-to-date skip
convert-docs --last             # re-run with the same source/destination/extensions as last time
convert-docs -j 8                # convert 8 files in parallel instead of the default 4
convert-docs -n                  # dry run: show what would happen, write nothing
Flag Description
-s, --source Source file or directory to convert (skips the interactive prompt)
-o, --output Output directory (mirrors source structure), or for a single-file source, an output directory or file path (skips the interactive prompt)
-e, --ext Comma-separated extensions to convert
-f, --force Force re-conversion even if output .md already exists and is up to date
-l, --last Reuse the source, destination, and extensions from the last run (skips prompts; cannot be combined with -s/-o)
-j, --jobs Convert this many files in parallel using separate processes (default: min(4, cpu_count); use 1 for sequential)
-n, --dry-run Show what would be converted, skipped, or collide, without writing anything
--log-file Append this run's output to a file as well as stdout
--version Print the installed version and exit

Files with unsupported extensions are listed at the end instead of being silently skipped, and any conversion failures are reported with the underlying error. Common noise directories (.git, node_modules, .venv, __pycache__, etc.) are skipped automatically. If two source files would produce the same output path (e.g. report.docx and report.pdf both map to report.md), the first is converted and the rest are reported as collisions rather than silently overwritten.

Paths are highlighted in supported terminals; set NO_COLOR=1 to disable.

Re-running on new files

Every run saves its source/destination/extensions to ~/.config/convert-docs/last_run.json. Since conversion already skips files whose output is up to date, convert-docs --last is a cheap way to pick up newly added files in a folder you've converted before — run it manually whenever you want to sync, or wire it into a cron job / scheduled task on whatever interval suits you (just point it at the tool's full path, e.g. ~/.local/bin/convert-docs --last, since scheduled jobs don't load your shell profile).

Update

uv tool upgrade convert-docs

Development

uv run pytest

Release files for convert-docs 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for convert-docs 0.5.0
File Size Uploaded
convert_docs-0.5.0.tar.gz 102.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for convert-docs 0.5.0
File Interpreter ABI Platform
convert_docs-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 112.9 kB

Release files / convert_docs-0.5.0.tar.gz

Download URL convert_docs-0.5.0.tar.gz
Size 102.9 kB
Tags Source
SHA-256 checksum
How to use checksums
58cd79b99f1d6c7a4eb4aacd4bd478df2e6d9a69c53dcee77e78bb9d21dfd6df
BLAKE2b-256 checksum
How to use checksums
eab7f0ae51ee85c99db22a50e65bf4e40e41a1ea4719bedfa39d21ad59469f4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / convert_docs-0.5.0-py3-none-any.whl

Download URL convert_docs-0.5.0-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c7b2fc6185c0d367fc9b9e1dc8aafad91758c36341bdfe13669765dc6b553af
BLAKE2b-256 checksum
How to use checksums
a2132f8882b54ff30bce0e7c69089ea5ca72dc872872c16f1bc35ff7d558db81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page