refactor: make repo Composer-compatible by moving php/ to root and ref/ to doc/reference_samples
- Move src/, tests/, bin/, generated/, proto/, composer.json, composer.lock, phpunit.xml from php/ to repo root - Move ref/ to doc/reference_samples/ for better organization - Remove vendor/ from git tracking (now properly gitignored) - Update all test file paths (dirname adjustments and ref/ -> doc/reference_samples/) - Update all documentation paths (AGENTS.md, doc/*.md) - Remove php.bak/ directory - All 252 tests pass
This commit is contained in:
parent
8dbcc1bafc
commit
22ba4aff7d
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,4 +1,4 @@
|
|||
.sisyphus
|
||||
.php-cs-fixer.cache
|
||||
.sisyphus
|
||||
php/.phpunit.result.cache
|
||||
.phpunit.result.cache
|
||||
vendor/
|
||||
|
|
|
|||
|
|
@ -57,10 +57,10 @@ PHP tools for parsing, modifying, and generating ProPresenter 7 files:
|
|||
### CLI Tools
|
||||
|
||||
```bash
|
||||
php php/bin/parse-song.php path/to/song.pro
|
||||
php php/bin/parse-playlist.php path/to/playlist.proplaylist
|
||||
php bin/parse-song.php path/to/song.pro
|
||||
php bin/parse-playlist.php path/to/playlist.proplaylist
|
||||
```
|
||||
|
||||
### Key Source Files
|
||||
|
||||
All PHP source code is in `php/src/`. Generated protobuf classes are in `php/generated/`. Tests are in `php/tests/`.
|
||||
All PHP source code is in `src/`. Generated protobuf classes are in `generated/`. Tests are in `tests/`.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ imagepng($image, $tmpPng);
|
|||
$imageBytes = file_get_contents($tmpPng);
|
||||
unlink($tmpPng);
|
||||
|
||||
$refDir = dirname(__DIR__, 2) . '/ref';
|
||||
$refDir = dirname(__DIR__) . '/doc/reference_samples';
|
||||
|
||||
$song = ProFileGenerator::generate(
|
||||
'TestBild',
|
||||
0
php/composer.lock → composer.lock
generated
0
php/composer.lock → composer.lock
generated
26
doc/INDEX.md
26
doc/INDEX.md
|
|
@ -112,24 +112,24 @@ This project provides PHP tools to parse, modify, and generate ProPresenter 7 fi
|
|||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `php/src/Song.php` | Song wrapper (read/modify `.pro` files) |
|
||||
| `php/src/ProFileReader.php` | Read `.pro` files |
|
||||
| `php/src/ProFileWriter.php` | Write `.pro` files |
|
||||
| `php/src/ProFileGenerator.php` | Generate `.pro` files from scratch |
|
||||
| `php/src/PlaylistArchive.php` | Playlist wrapper (read/modify `.proplaylist` files) |
|
||||
| `php/src/ProPlaylistReader.php` | Read `.proplaylist` files |
|
||||
| `php/src/ProPlaylistWriter.php` | Write `.proplaylist` files |
|
||||
| `php/src/ProPlaylistGenerator.php` | Generate `.proplaylist` files from scratch |
|
||||
| `php/src/PresentationBundle.php` | Bundle wrapper (read/write `.probundle` files) |
|
||||
| `php/src/ProBundleReader.php` | Read `.probundle` files |
|
||||
| `php/src/ProBundleWriter.php` | Write `.probundle` files |
|
||||
| `src/Song.php` | Song wrapper (read/modify `.pro` files) |
|
||||
| `src/ProFileReader.php` | Read `.pro` files |
|
||||
| `src/ProFileWriter.php` | Write `.pro` files |
|
||||
| `src/ProFileGenerator.php` | Generate `.pro` files from scratch |
|
||||
| `src/PlaylistArchive.php` | Playlist wrapper (read/modify `.proplaylist` files) |
|
||||
| `src/ProPlaylistReader.php` | Read `.proplaylist` files |
|
||||
| `src/ProPlaylistWriter.php` | Write `.proplaylist` files |
|
||||
| `src/ProPlaylistGenerator.php` | Generate `.proplaylist` files from scratch |
|
||||
| `src/PresentationBundle.php` | Bundle wrapper (read/write `.probundle` files) |
|
||||
| `src/ProBundleReader.php` | Read `.probundle` files |
|
||||
| `src/ProBundleWriter.php` | Write `.probundle` files |
|
||||
|
||||
### CLI Tools
|
||||
|
||||
```bash
|
||||
# Parse and display song structure
|
||||
php php/bin/parse-song.php path/to/song.pro
|
||||
php bin/parse-song.php path/to/song.pro
|
||||
|
||||
# Parse and display playlist structure
|
||||
php php/bin/parse-playlist.php path/to/playlist.proplaylist
|
||||
php bin/parse-playlist.php path/to/playlist.proplaylist
|
||||
```
|
||||
|
|
|
|||
|
|
@ -223,13 +223,13 @@ try {
|
|||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `php/src/PresentationBundle.php` | Bundle wrapper (Song + media files) |
|
||||
| `php/src/ProBundleReader.php` | Reads `.probundle` files (with Zip64Fixer) |
|
||||
| `php/src/ProBundleWriter.php` | Writes `.probundle` files (standard ZIP) |
|
||||
| `php/src/ProFileGenerator.php` | Generates `.pro` files with media support |
|
||||
| `php/src/Zip64Fixer.php` | Fixes ProPresenter ZIP64 header bug |
|
||||
| `ref/TestBild.probundle` | Generated reference file (PP7-verified) |
|
||||
| `ref/RestBildExportFromPP.probundle` | PP7-exported reference file |
|
||||
| `src/PresentationBundle.php` | Bundle wrapper (Song + media files) |
|
||||
| `src/ProBundleReader.php` | Reads `.probundle` files (with Zip64Fixer) |
|
||||
| `src/ProBundleWriter.php` | Writes `.probundle` files (standard ZIP) |
|
||||
| `src/ProFileGenerator.php` | Generates `.pro` files with media support |
|
||||
| `src/Zip64Fixer.php` | Fixes ProPresenter ZIP64 header bug |
|
||||
| `doc/reference_samples/TestBild.probundle` | Generated reference file (PP7-verified) |
|
||||
| `doc/reference_samples/RestBildExportFromPP.probundle` | PP7-exported reference file |
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ ProPlaylistGenerator::generateAndWrite(
|
|||
## CLI Tool
|
||||
|
||||
```bash
|
||||
php php/bin/parse-playlist.php path/to/playlist.proplaylist
|
||||
php bin/parse-playlist.php path/to/playlist.proplaylist
|
||||
```
|
||||
|
||||
Output includes:
|
||||
|
|
@ -212,14 +212,14 @@ See [Format Specification](../formats/pp_playlist_spec.md) Section 4 for details
|
|||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `php/src/PlaylistArchive.php` | Top-level playlist wrapper |
|
||||
| `php/src/PlaylistEntry.php` | Entry wrapper (song/header/placeholder) |
|
||||
| `php/src/PlaylistNode.php` | Playlist node wrapper |
|
||||
| `php/src/ProPlaylistReader.php` | Reads `.proplaylist` files |
|
||||
| `php/src/ProPlaylistWriter.php` | Writes `.proplaylist` files |
|
||||
| `php/src/ProPlaylistGenerator.php` | Generates `.proplaylist` files |
|
||||
| `php/src/Zip64Fixer.php` | Fixes ProPresenter ZIP64 header bug |
|
||||
| `php/bin/parse-playlist.php` | CLI tool |
|
||||
| `src/PlaylistArchive.php` | Top-level playlist wrapper |
|
||||
| `src/PlaylistEntry.php` | Entry wrapper (song/header/placeholder) |
|
||||
| `src/PlaylistNode.php` | Playlist node wrapper |
|
||||
| `src/ProPlaylistReader.php` | Reads `.proplaylist` files |
|
||||
| `src/ProPlaylistWriter.php` | Writes `.proplaylist` files |
|
||||
| `src/ProPlaylistGenerator.php` | Generates `.proplaylist` files |
|
||||
| `src/Zip64Fixer.php` | Fixes ProPresenter ZIP64 header bug |
|
||||
| `bin/parse-playlist.php` | CLI tool |
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ ProFileGenerator::generateAndWrite('output.pro', 'Song Name', $groups, $arrangem
|
|||
## CLI Tool
|
||||
|
||||
```bash
|
||||
php php/bin/parse-song.php path/to/song.pro
|
||||
php bin/parse-song.php path/to/song.pro
|
||||
```
|
||||
|
||||
Output includes:
|
||||
|
|
@ -282,16 +282,16 @@ try {
|
|||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `php/src/Song.php` | Top-level song wrapper |
|
||||
| `php/src/Group.php` | Group (song part) wrapper |
|
||||
| `php/src/Slide.php` | Slide wrapper with text access |
|
||||
| `php/src/TextElement.php` | Text element with RTF extraction |
|
||||
| `php/src/Arrangement.php` | Arrangement wrapper |
|
||||
| `php/src/RtfExtractor.php` | RTF to plain text converter |
|
||||
| `php/src/ProFileReader.php` | Reads `.pro` files |
|
||||
| `php/src/ProFileWriter.php` | Writes `.pro` files |
|
||||
| `php/src/ProFileGenerator.php` | Generates `.pro` files |
|
||||
| `php/bin/parse-song.php` | CLI tool |
|
||||
| `src/Song.php` | Top-level song wrapper |
|
||||
| `src/Group.php` | Group (song part) wrapper |
|
||||
| `src/Slide.php` | Slide wrapper with text access |
|
||||
| `src/TextElement.php` | Text element with RTF extraction |
|
||||
| `src/Arrangement.php` | Arrangement wrapper |
|
||||
| `src/RtfExtractor.php` | RTF to plain text converter |
|
||||
| `src/ProFileReader.php` | Reads `.pro` files |
|
||||
| `src/ProFileWriter.php` | Writes `.pro` files |
|
||||
| `src/ProFileGenerator.php` | Generates `.pro` files |
|
||||
| `bin/parse-song.php` | CLI tool |
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
- **IN**: Read+write existing content, parse all reference files
|
||||
- **OUT**: Creating new slides/groups from scratch, Laravel integration, playlist formats
|
||||
|
||||
- 2026-03-01 task-2 autoload decision: added `GPBMetadata\` => `generated/GPBMetadata/` to `php/composer.json` so generated `Rv\Data` classes can initialize descriptor metadata at runtime.
|
||||
- 2026-03-01 task-2 autoload decision: added `GPBMetadata\` => `generated/GPBMetadata/` to `composer.json` so generated `Rv\Data` classes can initialize descriptor metadata at runtime.
|
||||
|
||||
- 2026-03-01 task-2 ZIP64 repair strategy: patch archive headers in-memory only (no recompression), applying deterministic EOCD/ZIP64 size corrections before any `ZipArchive` access.
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
- Use **nowdoc** (`<<<'RTF'`) for RTF test data with hex escapes (`\'xx`)
|
||||
- Regular concatenated strings work for RTF without hex escapes (soft returns `\\` are fine)
|
||||
|
||||
- 2026-03-01 task-2 proto import resolution: copied full `Proto7.16.2/` tree (including `google/protobuf/*.proto`) into `php/proto/`; imports already resolve with `--proto_path=./php/proto`, no path rewrites required.
|
||||
- 2026-03-01 task-2 proto import resolution: copied full `Proto7.16.2/` tree (including `google/protobuf/*.proto`) into `proto/`; imports already resolve with `--proto_path=./proto`, no path rewrites required.
|
||||
- 2026-03-01 task-2 version extraction: `application_info.platform_version` from Test.pro = macOS 14.8.3; `application_info.application_version` = major 20, build 335544354.
|
||||
- 2026-03-01 task-6 binary fidelity baseline: decode->encode byte round-trip currently yields `0/169` identical files (`168` non-empty from `all-songs` + `Test.pro`); first mismatches typically occur early (~byte offsets 700-3000), indicating systematic re-serialization differences rather than isolated corruption.
|
||||
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
- Slide wraps Cue (not PresentationSlide) because UUID is on the Cue
|
||||
- Translation = second text element (index 1); no label detection needed
|
||||
- Lazy caching: textElements/allElements computed once per instance
|
||||
- Test.pro path from tests: dirname(__DIR__, 2) . '/ref/Test.pro' (2 levels up from php/tests/)
|
||||
- Test.pro path from tests: dirname(__DIR__) . '/doc/reference_samples/Test.pro' (1 level up from tests/)
|
||||
|
||||
## Task 7: Song + ProFileReader Integration (TDD)
|
||||
|
||||
|
|
@ -203,7 +203,7 @@
|
|||
## Task 10: parse-playlist.php CLI Tool
|
||||
|
||||
### Completed
|
||||
- ✅ Created `php/bin/parse-playlist.php` executable CLI tool
|
||||
- ✅ Created `bin/parse-playlist.php` executable CLI tool
|
||||
- ✅ Follows `parse-song.php` structure exactly (shebang, autoloader, argc check, try/catch)
|
||||
- ✅ Displays playlist metadata, entries with type-specific details, embedded file lists
|
||||
- ✅ Plain text output (no colors/ANSI codes)
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue