Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/b-viguier/PhPresent

Library to create a Slideshow, in PHP
https://github.com/b-viguier/PhPresent

imagick php sdl2 slideshow

Last synced: about 2 months ago
JSON representation

Library to create a Slideshow, in PHP

Awesome Lists containing this project

README

        

# PhPresent

_PhPresent_ is a library allowing to create a slideshow program in Php,
in the same way that [RevealJs](https://revealjs.com) for Javascript.
It is possible thanks to the [Php-SDL extension](https://github.com/Ponup/php-sdl) and
[Imagick extension](https://www.php.net/manual/en/book.imagick.php).

:warning: This library is freshly new,
it mays not work as expected in your particular environment.
Give it a try, and feel free to give some feedback about it.

## Installation

Be sure to have required extensions:
* [Php-SDL](https://pecl.php.net/package/sdl)
* [Imagick](https://pecl.php.net/package/imagick)

:warning: Sometimes, we may need some features of `Php-SDL` not released yet.
Be aware that some versions might need to compile the extension directly from the sources.

The create your project and install this library through [Composer](https://getcomposer.org/).
```bash
composer require bviguier/phpresent
```

## Usage
ℹ️ Have a look to the `examples` directory to quickly check that all is working fine for you.
When your program is running, press `h` to obtain some help about available commands.

### Bootstrapping your presentation

```php
start($presentation, $drawer);
```

### Using existing slides templates
Some templates are provided in the `PhPresent\Presentation\Template\Simple` namespace.

```php
$presentation
->addSlide(new Presentation\Template\Simple\TitleAndSubtitle(
'PhPresent', 'A Slideshow tool'
))
->addSlide(new Presentation\Template\Simple\FullscreenAnimatedImage(
$bitmapSequenceLoader->fromFile(__DIR__.'/../assets/images/whirlyGif.gif')
))
->addSlide(new Presentation\Template\Simple\BigTitle(
"Hello\nWorld!"
))
;
```

### Creating your own slides templates
Provided templates are very generic, and you may quickly want to create your own.
Check [`02-creating-slide.php` example](/examples/02-creating-slide.php) to see how it works.

### Creating animated slides
Here the funny part!
Have a look to [`03-animating-slide.php` example](/examples/03-animating-slide.php) for more details.

## Contributing

* `composer analyse`: static code analysis
* `composer cs`: code style (`composer cs-fix` to automatically fix it)
* `composer deps`: check dependencies between namespaces
* `composer ci`: run all previous commands for CI