pptx-lint
Lint / quality checker for python-pptx presentations.
Why?
If you generate PowerPoint files with python-pptx, you've probably run into these problems:
- 🔴 Overflow — Text boxes or tables exceeding slide boundaries
- 🟡 Overlap — Shapes covering each other because of hard-coded coordinates
- 🟡 Fake tables — Multiple text boxes trying (and failing) to look like a table
- ℹ️ Small fonts — Text too small to read
- 🔴 Empty slides — Slides without any content
pptx-lint automatically detects all of these, giving you a clear report so you can fix them before presenting.
Quick start
pip install pptx-lint
# Check a single file
pptx-lint presentation.pptx
# Check all files in a directory
pptx-lint ./output/
Example output
======================================================================
pptx-lint report
File: my_presentation.pptx
======================================================================
Slides: 12 | Empty: 0
Errors: 3 | Warnings: 5 | Infos: 2
======================================================================
[Slide 4]
Content: Performance Metrics | Results
✗ [Overflow] Shape#3 (Performance table): right overflow (r=12.80" > 10.00")
▲ [FakeTable] 6 text boxes form a grid (e.g.: Precision, Recall)
[Slide 7]
Content: System Architecture Overview
▲ [Overlap] Shape#2 overlaps Shape#4 — overlap area: 2.30 sq.in.
[Slide 9]
Content: References
i [SmallFont] Shape#1: 'Acknowledgements' font = 7pt (< 8pt)
Checks
| Rule | Severity | What it detects |
|---|---|---|
| Overflow | 🔴 Error | Shapes whose left/top < 0 or right/bottom > slide dimensions |
| Empty slide | 🔴 Error | Slides with zero shapes |
| Overlap | 🟡 Warning | Two shapes overlapping > 50% of the smaller shape's area |
| Fake table | 🟡 Warning | ≥4 text boxes arranged in a ≥2×2 grid (should use add_table()) |
| Small font | ℹ️ Info | Text smaller than 8 pt |
Use as a library
from pptx_lint.checker import check_pptx
results, filename = check_pptx("my_slides.pptx")
for slide in results:
for err in slide['errors']:
print(f"Slide {slide['slide_num']}: {err['detail']}")
Development
git clone https://github.com/LeppardWang/pptx-lint.git
cd pptx-lint
pip install -e ".[dev]"
pytest
Related
- python-pptx — the library that creates
.pptxfiles - python-pptx-table — helpers for Table objects
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pptx_lint-0.2.0.tar.gz
(12.0 kB
view details)
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
pptx_lint-0.2.0-py3-none-any.whl
(12.1 kB
view details)
File details
Details for the file pptx_lint-0.2.0.tar.gz.
File metadata
- Download URL: pptx_lint-0.2.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc1f4e0609e7199a64b14aac8c7489e6893c54cb751b0ca56f9daa2903f4e860
|
|
| MD5 |
4f9a9be53ddc2c85e88bc01c0cbfeea8
|
|
| BLAKE2b-256 |
25c49a926b455e8a579361e3ea2178868c5f347c141f7f5bc9021309a44d3bc5
|
File details
Details for the file pptx_lint-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pptx_lint-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eff139c2247165cfec9774599e821b31eaf1631ed042971112c695b9cb910184
|
|
| MD5 |
015449b17d0a5b2546d897ef94e99690
|
|
| BLAKE2b-256 |
eb3ab6d92bc4716cfd474ad0020a6f968daae146995157206490a90ee614224f
|