Universal file-to-Markdown converter — optimized for AI consumption.
Project description
tomd
Convert any file to clean Markdown — optimized for AI consumption.
tomd is an all-in-one CLI tool that converts 15+ file formats into
token-efficient, structure-preserving Markdown. Feed documents, spreadsheets,
presentations, images, audio, and even YouTube videos to your favourite LLM
without wasting context window on noisy formatting.
Quick Start
# Install core (PDF, DOCX, PPTX, HTML, CSV, JSON, XML, XLSX, EPUB, text, ZIP)
pip install tomd-converter
# Optional extras
pip install tomd-converter[ocr] # Image EXIF + OCR (Pillow, pytesseract)
pip install tomd-converter[audio] # Audio metadata + transcription (mutagen, Vosk)
pip install tomd-converter[youtube] # YouTube metadata + subtitles (yt-dlp)
pip install tomd-converter[all] # Everything
Usage
# Single file → stdout (pipe to clipboard, AI tool, etc.)
tomd report.pdf
tomd report.pdf | xclip -selection clipboard
# Save to file
tomd document.docx -o output.md
# Batch convert
tomd *.pdf
tomd ./documents/
# YouTube
tomd "https://youtube.com/watch?v=dQw4w9WgXcQ"
# Options
tomd file.pdf --no-meta # Skip YAML frontmatter
tomd large.csv --max-rows 100 # Truncate tables
tomd --list-formats # Show supported formats
Supported Formats
| Format | Extensions | Extra |
|---|---|---|
.pdf |
core | |
| Word | .docx |
core |
| PowerPoint | .pptx |
core |
| Excel | .xlsx, .xls |
core |
| HTML | .html, .htm |
core |
| EPUB | .epub |
core |
| CSV/TSV | .csv, .tsv |
core |
| JSON | .json, .jsonl |
core |
| XML/SVG | .xml, .svg |
core |
| Plain text | .txt, .log, .md |
core |
| Source code | .py, .js, .rs, … |
core |
| ZIP | .zip |
core |
| Images | .jpg, .png, .webp, … |
[ocr] |
| Audio | .mp3, .wav, .flac, … |
[audio] |
| YouTube | URL | [youtube] |
Output Format
tomd produces clean, AI-friendly Markdown with minimal YAML frontmatter:
---
source: quarterly_report.pdf
type: pdf
title: Q4 Financial Report
---
# Q4 Financial Report
Revenue increased by 15% year-over-year…
| Metric | Q3 | Q4 |
| --- | --- | --- |
| Revenue | $10M | $11.5M |
| Profit | $2M | $2.8M |
Why tomd?
- 🤖 AI-optimized — Clean output, minimal frontmatter, no wasted tokens
- 📦 All-in-one — One tool for PDFs, docs, spreadsheets, images, audio, video
- 🔌 Extensible — Plugin architecture, easy to add new formats
- ⚡ Fast — Lazy dependency loading, only imports what you need
- 🛡️ Robust — Graceful fallbacks, never crashes on bad input
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tomd_converter-0.1.0.tar.gz.
File metadata
- Download URL: tomd_converter-0.1.0.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5d479eff7e9bdf9fd032cf3ec701ca89dbfd5ace2f383706e5c9c727833e551
|
|
| MD5 |
4743970510022f1c61657f0ddd4eae67
|
|
| BLAKE2b-256 |
3e27a289429f1e14700fa3d3a888c21d5caed28d82e821d5f9d5ae342af86e79
|
Provenance
The following attestation bundles were made for tomd_converter-0.1.0.tar.gz:
Publisher:
publish.yml on earthwrld/tomd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tomd_converter-0.1.0.tar.gz -
Subject digest:
d5d479eff7e9bdf9fd032cf3ec701ca89dbfd5ace2f383706e5c9c727833e551 - Sigstore transparency entry: 1937550822
- Sigstore integration time:
-
Permalink:
earthwrld/tomd@2cd35c7b5699496afb2a28a13e96fd47b3d31deb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/earthwrld
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2cd35c7b5699496afb2a28a13e96fd47b3d31deb -
Trigger Event:
push
-
Statement type:
File details
Details for the file tomd_converter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tomd_converter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67ded9fb7cee6674bfcbd8ebef8b76d262d0a0d21e2e6302839d5cef16b42021
|
|
| MD5 |
0b118b1d0274949fbbf2f9449df672ab
|
|
| BLAKE2b-256 |
7e159811c10159f6d250f8d95f0bb194af776b0ab9738cd291f79ad7b3816d9e
|
Provenance
The following attestation bundles were made for tomd_converter-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on earthwrld/tomd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tomd_converter-0.1.0-py3-none-any.whl -
Subject digest:
67ded9fb7cee6674bfcbd8ebef8b76d262d0a0d21e2e6302839d5cef16b42021 - Sigstore transparency entry: 1937551002
- Sigstore integration time:
-
Permalink:
earthwrld/tomd@2cd35c7b5699496afb2a28a13e96fd47b3d31deb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/earthwrld
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2cd35c7b5699496afb2a28a13e96fd47b3d31deb -
Trigger Event:
push
-
Statement type: