Lint / quality checker for python-pptx presentations — detects overflow, overlap, fake tables, small fonts, and empty slides
Project description
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
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 pptx_lint-0.1.0.tar.gz.
File metadata
- Download URL: pptx_lint-0.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e25f35cad489ebe1541a03f7185ca8ef8814306c49b5dd4c318c4828f32561f2
|
|
| MD5 |
31e28d7e036b3aae46c6060f19211cc2
|
|
| BLAKE2b-256 |
c7fd6accea844647223b7f87768821bbbe0e70e82bc1b11069c3220abd3b4d50
|
File details
Details for the file pptx_lint-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pptx_lint-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.7 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 |
d3ddd6f32072d4e558438fa617f5cc16e9634214097fcecd3b4a6c4144019bed
|
|
| MD5 |
6dca145b1457f9462d0903cad4e68e48
|
|
| BLAKE2b-256 |
d5752179593c5620c5482a9323bf8065dc8e1f06bf87f94a08a7b2faba620f1a
|