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.

pip install slidebake

For local development:

uv venv --python 3.12
uv sync
uv run slidebake --help

Usage

slidebake slides.pdf
# writes slides.md

slidebake slides.pdf --target-lang zh-CN
# writes slides_zh-CN_translated.md

slidebake slides.pdf --target-lang zh-CN --bilingual
# writes slides_zh-CN_bilingual.md

Use -o/--output to choose an exact output path instead.

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.1.tar.gz (13.2 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.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slidebake-0.1.1.tar.gz
  • Upload date:
  • Size: 13.2 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.1.tar.gz
Algorithm Hash digest
SHA256 d384ea8b365a9747040cbd583ff5a711e0ddc822e72a8235480a66ac14e0ef00
MD5 be472cc3c77667142c07fb365ae636df
BLAKE2b-256 25b6427bd289ebccd29bb9a1fe5f48ecb3a42bcffdd483d4e6167581328df8d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for slidebake-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: slidebake-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc7ec06e3f966d75d7d2f27d92455a8e01005e89659f7d7ef59b3e8f58c34ea3
MD5 c941ad23079698e947e75eae67583936
BLAKE2b-256 47f3d26aead007f1c6a9851190618521b26dc50d751c26f2bb10781064568e0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for slidebake-0.1.1-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