Add Keynote reader and writer#891
Open
yasumorishima wants to merge 1 commit into
Open
Conversation
Add basic support for the Apple Keynote (.key) presentation format, targeting the legacy iWork '09 structure where the presentation is stored as an `index.apxl` XML document inside the `.key` package. The reader and writer cover slides, text placeholders (paragraphs and runs), shape geometry and speaker notes, and are validated with a round-trip test. The modern IWA binary format used by Keynote '13 and later is intentionally out of scope and is safely rejected by canRead(). Both classes follow the existing reader/writer conventions, are registered in IOFactory for automatic resolution, and are documented in the usage pages. Refs PHPOffice#48
fc81da2 to
4e7e96b
Compare
Author
|
A quick note on the currently red CI jobs — they are all unrelated to this change:
The new Keynote reader/writer is green on every job where the environment resolves correctly: PHPStan 7.1 / 7.4 / 8.0–8.3, PHPUnit 7.1 / 7.4 / 8.0 / 8.2 / 8.3 / 8.4, all Happy to adjust anything on request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Adds a Reader and Writer for the Apple Keynote (
.key) presentation format.The implementation targets the legacy iWork '09 structure, where a Keynote
package is a Zip archive containing an
index.apxlXML document. Both classesfollow the existing reader/writer conventions (
ReaderInterface/AbstractWriter)and are registered in
IOFactoryfor automatic resolution.Supported in this first milestone:
Why
Resolves the long-standing request for Keynote support (#48). A previous attempt
(#860) targeted the modern IWA binary format and stalled; this PR deliberately
scopes to the XML-based iWork '09 structure so it can be implemented in pure PHP
(no new dependencies), stays compatible with PHP 7.1+, and is fully verifiable in
CI.
Scope / limitations (intentional)
Protobuf) is out of scope and is safely rejected by
canRead()(no falsepositives).
directly in a current Keynote.app. Correctness is instead guaranteed by a
round-trip test (write → read → assert structure).
properties are left as follow-up work.
How it was tested
(including empty-presentation and
canRead()rejection cases for non-Keynotefiles, non-Zip files and directories).
phpunit,phpstan(level 6),php-cs-fixerandphpmdall pass; the fullexisting suite remains green (no regressions).
Notes
ext-xmlandext-zip(already required).docs/usage/readers.mdanddocs/usage/writers.md.Closes #48
/claim #48