PHPackages                             bigwhoop/trumpet - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. bigwhoop/trumpet

AbandonedLibrary[Templating &amp; Views](/categories/templating)

bigwhoop/trumpet
================

Presentation tool for PHP

0.1.4(11y ago)823MITPHPPHP &gt;=5.6

Since May 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bigwhoop/trumpet)[ Packagist](https://packagist.org/packages/bigwhoop/trumpet)[ RSS](/packages/bigwhoop-trumpet/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (6)Used By (0)

Trumpet
=======

[](#trumpet)

The presentation tool for PHP developers.

[![Build Status](https://camo.githubusercontent.com/0a886c71fb371ed085c58ab740ac3b106428c915215ab0ab67a8b795f17997fd/68747470733a2f2f7472617669732d63692e6f72672f62696777686f6f702f7472756d7065742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bigwhoop/trumpet)[![Code Coverage](https://camo.githubusercontent.com/877f9e90ae928d6fd9458179c0ed444b4ad5828c95afb4954eb04815e6a7b97c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62696777686f6f702f7472756d7065742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bigwhoop/trumpet/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b1814f3d2f708bca86e5cb6dfe4ec4b0fab45051da85077157cce1834fff24da/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62696777686f6f702f7472756d7065742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bigwhoop/trumpet/?branch=master)

Quick Guide
-----------

[](#quick-guide)

```
composer global require bigwhoop/trumpet
mkdir ~/Presentations && cd ~/Presentations
trumpet

```

Go to .

Features
--------

[](#features)

- Runs in the browser
- Uses yaml for metadata
- Uses markdown (extra) for slides
- Supports interactive elements like:
    - Running example code
    - Embedding of text files (HTML, CSS, etc.)
    - Dynamic embedding of PHP code (whole files, classes, methods, functions, lines)
    - Embedding images with automatic resizing, cropping, etc.
    - Summary Quotes from Wikipedia
    - ...
- Themeable (using Twig)

Installation
------------

[](#installation)

```
composer global require bigwhoop/trumpet

```

Make sure that the `~/.composer/vendor/bin` folder is in your `PATH` environment variable. This [blog post](http://akrabat.com/global-installation-of-php-tools-with-composer/) should help you.

Usage
-----

[](#usage)

By default trumpet uses PHP's built-in webserver. Just run

```
trumpet

```

to start it. You should see something like this:

```
λ trumpet
2015-05-02 22:25:48 [INFO] Starting webserver on localhost:8075 ...

```

So fire up your browser and head over to .

**Trumpet always uses the directory from where it is started to locate presentations.**

### Workspaces

[](#workspaces)

It's recommended to create a new folder for all your presentations.

```
mkdir ~/Presentations
cd ~/Presentations

```

#### Themes

[](#themes)

You can download or create custom themes. Trumpet will look for a `.theme` directory in the current working directory.

Presentations
-------------

[](#presentations)

Trumpet presentations are stored in files with a `.trumpet` extension. Here's an example:

```
title: Our test presentation
subtitle: An optional sub-title
date: 2015-05-20
authors:
- Max Microwave, Some Company Lts., @themax
- name: Freddy Frypan
  email: freddy@example.org
  twitter: freddy
  company: Another Company
  website: www.example.org
  skype: freedy.frypan

slides: |
  # This is a title, it's on its own page

  ## This is a subtitle, it will create a new slide

  This is some example text.

  ### And this is a sub-subtitle

  And some more text. Yay.

  ## A new slide?

  Yep, like I told you. Titles and subtitles always create a new slide.

  - These are
  - bullet points.

```

### Slides

[](#slides)

- Slides are written in Markdown (Extra).
- Headings 1 will be shown on their own slide.
- Headings 2 will force a new slide.

Commands
--------

[](#commands)

In your `slides` markup you can use Commands to make the presentation dynamic.

### Code Command

[](#code-command)

Include PHP code into you slides. Maybe in the future other programming languages will be supported.

Let's say we have the following `Number.php` located in `~/presentations/Number.php`:

```
