Skip to main content

Bake slide-deck PDFs into page-by-page Markdown with OCR and optional translation.

Project description

slidebake

slidebake turns slide-deck PDFs, including image-only PDFs exported from PowerPoint, into page-by-page Markdown. It uses local OCR first, then can ask the OpenAI API to clean OCR noise and translate each page.

Install

slidebake should be installed with Python 3.12. One of its OCR dependencies does not currently support newer Python versions.

pipx install slidebake

For local development:

git clone https://github.com/heyifan142857/slidebake.git
cd slidebake
uv venv --python 3.12
uv sync
uv run slidebake --help

Usage

slidebake slides.pdf -o slides.md
slidebake slides.pdf -o slides_zh.md --target-lang zh-CN
slidebake slides.pdf -o slides_bilingual.md --target-lang zh-CN --bilingual

Translation requires:

export OPENAI_API_KEY="your_api_key_here"

You can also put OpenAI or OpenAI-compatible provider settings in ~/.config/slidebake/config.toml:

[openai]
api_key = "your_api_key_here"
model = "gpt-5.4-mini"
api = "responses"

For providers that expose an OpenAI-compatible Chat Completions endpoint:

[openai]
api_key = "provider_api_key"
base_url = "https://api.example.com/v1"
model = "provider-model"
api = "chat_completions"

Command-line options and SLIDEBAKE_OPENAI_* environment variables override the config file. Use --config path/to/config.toml to load a different config file.

Useful options:

  • --pages 1-10,15 limits processing to specific pages.
  • --dpi 220 changes render resolution for OCR.
  • --model gpt-5.4-mini changes the OpenAI model.
  • --openai-base-url https://api.example.com/v1 uses an OpenAI-compatible endpoint.
  • --openai-api chat_completions uses the Chat Completions compatibility path.
  • --check-key checks resolved OpenAI-compatible settings without processing a PDF.
  • --keep-temp keeps rendered page images for debugging.
  • --overwrite replaces an existing output file.

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

slidebake-0.1.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

slidebake-0.1.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file slidebake-0.1.0.tar.gz.

File metadata

  • Download URL: slidebake-0.1.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for slidebake-0.1.0.tar.gz
Algorithm Hash digest
SHA256 98d57b33e196f8a9299b5abc14ec72951e9b1e4c1e15c0298c316f65cec188a7
MD5 d951c0700860ca1a41faf06a9ea7cf89
BLAKE2b-256 cbb558b6bb990a03dfebcb8ac35e705028611d5a1012c187b7cdc105cf54c55d

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on heyifan142857/slidebake

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

File details

Details for the file slidebake-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: slidebake-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for slidebake-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 909536eade46c6ac7ec81ff87f42f09a6733b48eb03260c9d8f066bfd737640d
MD5 7cd1913aa8ecd94bc0ab7531687e698a
BLAKE2b-256 00f9380a43f12c46d0c791da11d4b7b2d0d84a602cc68f704072e120e80f8867

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on heyifan142857/slidebake

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