Skip to main content

Recursively convert documents (pdf, docx, pptx, xlsx, ...) to Markdown via markitdown, mirroring the source folder structure into a destination folder.

Project description

convert-docs

Recursively convert documents (pdf, docx, pptx, xlsx, and more) to Markdown via markitdown, mirroring the source folder structure into a destination folder.

Install

Requires uv. If you don't have it yet:

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Then install the tool:

uv tool install convert-docs

No uv? Plain pip also works, as long as it's Python 3.10+: pip install convert-docs.

Usage

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

convert-docs

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
Flag Description
-s, --source Source directory to scan (skips the interactive prompt)
-o, --output Output directory, mirrors source structure (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)

Files with unsupported extensions are listed at the end instead of being silently skipped, and any conversion failures are reported with the underlying error.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

convert_docs-0.2.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

convert_docs-0.2.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file convert_docs-0.2.0.tar.gz.

File metadata

  • Download URL: convert_docs-0.2.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","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}

File hashes

Hashes for convert_docs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f773cc5ea023feff8ae5a52d807a5123c5db0b80a4140450d14fb88f554b936b
MD5 06f39592e3f68a836ce3e4258b938e6c
BLAKE2b-256 da99f45d3ec3dfd4f2ed39441b5198df41201525d997e48c5c55390c9b1d5a40

See more details on using hashes here.

File details

Details for the file convert_docs-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: convert_docs-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","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}

File hashes

Hashes for convert_docs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 001071f3accfb0abab08145fc221c3b544e78678ff9974c908a6228e0d089616
MD5 43b043400b47e80424658f0dc85b8d52
BLAKE2b-256 d5e769160287323c1fcf67f9c0146f491152a66c034f9eeb1549bfd3cd0a2601

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page