Skip to main content

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 .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


Download files

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

Source Distribution

tomd_converter-0.1.0.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

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

tomd_converter-0.1.0-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

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

Hashes for tomd_converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d5d479eff7e9bdf9fd032cf3ec701ca89dbfd5ace2f383706e5c9c727833e551
MD5 4743970510022f1c61657f0ddd4eae67
BLAKE2b-256 3e27a289429f1e14700fa3d3a888c21d5caed28d82e821d5f9d5ae342af86e79

See more details on using hashes here.

Provenance

The following attestation bundles were made for tomd_converter-0.1.0.tar.gz:

Publisher: publish.yml on earthwrld/tomd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for tomd_converter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67ded9fb7cee6674bfcbd8ebef8b76d262d0a0d21e2e6302839d5cef16b42021
MD5 0b118b1d0274949fbbf2f9449df672ab
BLAKE2b-256 7e159811c10159f6d250f8d95f0bb194af776b0ab9738cd291f79ad7b3816d9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tomd_converter-0.1.0-py3-none-any.whl:

Publisher: publish.yml on earthwrld/tomd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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