Releases: paper-instruments/paper-pptx
Release list
paper-pptx 0.2.0
pptx.edit, pptx.compose, and pptx.diff used to fall back on ordinal position and
display names when no unique match existed. In 0.2.0 they resolve through structural
identity and raise where several candidates fit. Four report schemas changed shape, and
Presentation.scrub() is gone.
Breaking changes
0.2.0 removes Presentation.scrub()
The pptx.scrub module went with it (#14). Nothing replaces either one. Delete the calls.
Four report schemas advanced
Pin your readers to the new versions:
| Module | Report | 0.1.2 | 0.2.0 |
|---|---|---|---|
pptx.diff |
paper-deck-diff |
2 | 5 |
pptx.inspect |
paper-text-inspection |
2 | 3 |
pptx.edit |
paper-replace-result |
1 | 2 |
pptx.compose |
paper-import-report |
1 | 3 |
pptx.rebind stays at 1. Each number advanced in the PR that changed the payload shape:
deck diff at #27, #44, and #45; inspection and replace-result at #40; import report at #42
and #43. No version number was reused for a second shape.
Matching requires a unique candidate
A three-field text anchor written against 0.1.2 still resolves when it matches one paragraph
and one only. Where it matches several, pptx.edit raises instead of taking the first (#40).
Automatic layout selection, placeholder reconciliation, and section selection follow the same
rule (#41, #42, #43). Name the target yourself through target_layout, placeholder_map, or
section_id.
Additions
Presentation.batch()validates the deck once when the block exits rather than once per
mutating call. Opt-in; per-edit validation stays the default (#17).Table.insert_column(copy_format_from=...)copies direct cell formatting from an existing
column. Text, merge state, and computed table-style appearance stay behind (#37)._Cell.extend_merge()grows a merge rectangle rightward or downward and rolls back whole
on conflict (#37).pptx.inspectresolves a bullet's inherited typeface and size up the paragraph chain, and
pptx.diffreports bullet changes (#16, #27).
Decks that 0.1.2 refused
Four guards rejected files PowerPoint opens:
- ZIP directory entries.
zip -randshutil.make_archivewrite these zero-byte members
by default, so every unzip-edit-rezip loop hit the refusal (#25). - Parts nothing references (#24).
- Save destinations the writer could not read back or rewind. Rollback needs both, so both
were checked before writing rather than before rolling back (#23). - Group nesting past depth 16, and the zipguard resource ceilings. Both refused files
paper-pptx writes itself (#19, #15).
Two guards moved the other way to match what PowerPoint rejects: a part carrying no content
type (#24), and bytes sitting in front of the archive (#21). Relationship refusals now carry
a type and name the remedy (#26).
Fixes
diff_package,diff_decks, andpatch_savereturn one verdict. OPC relationship and
content-type registries that differ only in serialization compare equal (#36).- Deck diff matches top-level shapes on slide-wide shape ID rather than display name, refuses
duplicate IDs, and reports incompatible reuse as a removal plus an addition (#44). - Paragraph and table diffing emits one prefix/suffix-bounded hunk per stable container, and
reports table dimensions without inferring which row or column moved (#45, #46).
Documentation
The wheel ships no .rst, and a trace audit found agents reading installed source in 69
traces and .rst in none, so docstrings now cover the fork delta (#31). Separate contracts
document mixed-run replacement, boundary and refusal behavior, stale anchors, and the split
between table content and graphic-frame ownership (#38). The README lost 415 lines (#35).
Install
pip install paper-pptx==0.2.0
paper-pptx and python-pptx cannot share the pptx import name. paper-pptx-doctor
checks that only one is installed.
paper-pptx 0.1.0
What's Changed
- paper-pptx v0: complete delivery (Phases 0–9) by @daanishkhazi in #3
- PLAN-v0.1: integrity wave, then the write half by @daanishkhazi in #4
- v0.11: table surgery, real fields, scrub, rebind, cross-deck import, deck diff by @daanishkhazi in #5
- Public-release cleanup: README rewrite, fork API docs, remove internal planning docs by @daanishkhazi in #6
- Prepare paper-pptx 0.1.0 PyPI release by @daanishkhazi in #7
Full Changelog: https://github.com/The-LLM-Data-Company/paper-pptx/commits/v0.1.0