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 asks the OpenAI API to
clean OCR noise into polished Markdown, with optional translation for 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
# cleans OCR into slides.md
slidebake slides.pdf --target-lang zh-CN
# cleans OCR, translates it, and writes slides_zh-CN_translated.md
slidebake slides.pdf --target-lang zh-CN --bilingual
# cleans OCR, then writes source text plus zh-CN in slides_zh-CN_bilingual.md
Use -o/--output to choose an exact output path instead.
LLM cleanup and translation require:
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,15limits processing to specific pages.--dpi 220changes render resolution for OCR.--model gpt-5.4-minichanges the OpenAI model.--openai-base-url https://api.example.com/v1uses an OpenAI-compatible endpoint.--openai-api chat_completionsuses the Chat Completions compatibility path.--check-keychecks resolved OpenAI-compatible settings without processing a PDF.--keep-tempkeeps rendered page images for debugging.--overwritereplaces an existing output file.
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 slidebake-0.1.2.tar.gz.
File metadata
- Download URL: slidebake-0.1.2.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8e312f5e43d75cc63bad39fa6dbc21e23f38446c43e5ac051c7e294371ac9fa
|
|
| MD5 |
d58eeadcf23681846403497547783fa8
|
|
| BLAKE2b-256 |
c530ef97bf38124f0a6f2688886e732fb3843693304cc3c5118eeab57f9a47c5
|
Provenance
The following attestation bundles were made for slidebake-0.1.2.tar.gz:
Publisher:
publish.yml on heyifan142857/slidebake
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
slidebake-0.1.2.tar.gz -
Subject digest:
c8e312f5e43d75cc63bad39fa6dbc21e23f38446c43e5ac051c7e294371ac9fa - Sigstore transparency entry: 1449913967
- Sigstore integration time:
-
Permalink:
heyifan142857/slidebake@000b316ae57c2a3db506595150754be78cf99a06 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/heyifan142857
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@000b316ae57c2a3db506595150754be78cf99a06 -
Trigger Event:
release
-
Statement type:
File details
Details for the file slidebake-0.1.2-py3-none-any.whl.
File metadata
- Download URL: slidebake-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.0 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 |
a0c011008e41b540871edb476d8632053231abb50fc03f0a3255fe1e2fd5c4ee
|
|
| MD5 |
33e1a80838ae2765a26536399eb860c8
|
|
| BLAKE2b-256 |
ac6d6d5b57032877e259efe6673040f00a833f8a8101e28c2fe1375ded2d7173
|
Provenance
The following attestation bundles were made for slidebake-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on heyifan142857/slidebake
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
slidebake-0.1.2-py3-none-any.whl -
Subject digest:
a0c011008e41b540871edb476d8632053231abb50fc03f0a3255fe1e2fd5c4ee - Sigstore transparency entry: 1449914393
- Sigstore integration time:
-
Permalink:
heyifan142857/slidebake@000b316ae57c2a3db506595150754be78cf99a06 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/heyifan142857
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@000b316ae57c2a3db506595150754be78cf99a06 -
Trigger Event:
release
-
Statement type: