PHP 8.4 library and CLI tools to read, modify, and generate ProPresenter 7 files: songs (.pro), playlists (.proplaylist), bundles (.probundle), themes, and the global library files (Macros, Labels, Groups, ClearGroups, CCLI, Messages, Timers, Stage, Workspace, Props, TestPatterns, Calendar, KeyMappings, CommunicationDevices). Built on the MIT-licensed ProPresenter7-Proto schema by greyshirtguy (v7.16.2). Includes 18 CLI parsers, comprehensive API docs in doc/, binary-format specs, and a synthetic 369-test PHPUnit suite covering RTF extraction, translation slides, ZIP64 repair, round-trip fidelity, and end-to-end generation.
81 lines
1.5 KiB
Markdown
81 lines
1.5 KiB
Markdown
# Props Library API
|
|
|
|
> PHP module for reading, modifying, and writing the global ProPresenter `Props` file.
|
|
|
|
## Quick Reference
|
|
|
|
```php
|
|
use ProPresenter\Parser\PropsFileReader;
|
|
use ProPresenter\Parser\PropsFileWriter;
|
|
|
|
$library = PropsFileReader::read('/path/to/Props');
|
|
|
|
foreach ($library->getProps() as $prop) {
|
|
$prop->getName();
|
|
$prop->getUuid();
|
|
$prop->isEnabled();
|
|
}
|
|
|
|
PropsFileWriter::write($library, '/path/to/Props');
|
|
```
|
|
|
|
---
|
|
|
|
## File Layout
|
|
|
|
The `Props` file is `Rv\Data\PropDocument` from `propDocument.proto`.
|
|
Each prop is stored as a `Rv\Data\Cue` in the document's `cues` field.
|
|
|
|
---
|
|
|
|
## PropLibrary
|
|
|
|
```php
|
|
$library->getDocument();
|
|
$library->getProps();
|
|
$library->getPropByUuid('1FB2...'); // case-insensitive
|
|
$library->getPropByName('Props #1');
|
|
$library->addProp($prop);
|
|
$library->removeProp($uuid);
|
|
$library->count();
|
|
$library->getApplicationInfo();
|
|
```
|
|
|
|
---
|
|
|
|
## Prop
|
|
|
|
```php
|
|
$prop->getName();
|
|
$prop->setName('Lower Third');
|
|
$prop->getUuid();
|
|
$prop->setUuid('...');
|
|
$prop->isEnabled();
|
|
$prop->setEnabled(true);
|
|
$prop->getCompletionTime();
|
|
$prop->getActions();
|
|
$prop->getProto();
|
|
```
|
|
|
|
Use `getProto()` for full Cue/action access.
|
|
|
|
---
|
|
|
|
## CLI Tool
|
|
|
|
```bash
|
|
php bin/parse-props.php /path/to/Props
|
|
```
|
|
|
|
---
|
|
|
|
## Key Files
|
|
|
|
| File | Purpose |
|
|
|------|---------|
|
|
| `src/PropsFileReader.php` | Reads the `Props` file |
|
|
| `src/PropsFileWriter.php` | Writes the `Props` file |
|
|
| `src/PropLibrary.php` | Document wrapper and indexes |
|
|
| `src/Prop.php` | Single Cue/prop wrapper |
|
|
| `bin/parse-props.php` | CLI summary tool |
|