2017 © Pedro Peláez
 

symfony-bundle slides-generator-bundle

Symfony bundle for automated setup of slides

image

thormeier/slides-generator-bundle

Symfony bundle for automated setup of slides

  • Thursday, August 18, 2016
  • by thormeier
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

SlidesGeneratorBundle

Build Status, (*1)

Introduction

This Symfony bundle provides a command to generate slides for Sprint review presentations based on the git commit history., (*2)

Installation

Step 1: Composer require

$ php composer.phar require "thormeier/breadcrumb-bundle"

Step 2: Enable the bundle in the kernel

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Thormeier\SlidesGeneratorBundle\ThormeierSlidesGeneratorBundle(),
        // ...
    );
}

Configuration

Enable the bundle in your config.yml:, (*3)

# config.yml
thormeier_slides_generator:
    identifier_pattern: "/(TICKET [0-9]+)/"

Note that the identifier_pattern is required. There's no default. More on this further down., (*4)

The complete configuration is as follows:, (*5)

# config.yml
thormeier_slides_generator:
    identifier_pattern:   ~ # Required
    keyword_add:          ':slides'
    repository_service:   thormeier_slides_generator.repository.git
    renderer_service:     thormeier_slides_generator.renderer.markdown
    generator_service:    thormeier_slides_generator.generator

Usage

Start adding :slides to your git commit messages if you want to add them to the slides. Execute the Symfony command slides:generate to generate an output of the slides in the console., (*6)

Changing the keyword to add a commit to the slides

If you want to use something different then :slides in your commit messages to indicate an adding to the slides of a commit, you can configure it like so:, (*7)

# config.yml
thormeier_slides_generator:
    keyword_add: "add this to the slides"

The repository will look for the occurrence of this string in a commit message and adds the commit as a slide., (*8)

Using a different pattern for ticket names

By using the regex "/(TICKET [0-9]+)/", the first matching occurrence of something like TICKET 1234 is used as the slides title/identifier. Multiple commits with the same identifier that contain the configured slides keyword are squashed into a single slide., (*9)

You can configure the identifier_pattern like so:, (*10)

# config.yml
thormeier_slides_generator:
    identifier_pattern: "/(TICKET [0-9]+)/"

Any valid regex will do., (*11)

Replacing the git storage

To replace the git storage (default), define a service that implements the Thormeier\SlidesGeneratorBundle\Repository\SlideRepositoryInterface interface. You can then configure this service as your desired repository service in the config:, (*12)

# config.yml
thormeier_slides_generator:
    repository_service: "acme.slides_renderer" # Replace `acme.slides_repository` with your service ID

You could then, for instance, use a database as your storage or implement something else entirely., (*13)

Replacing the markdown renderer

To replace the markdown renderer (default), define a service that implements the Thormeier\SlidesGeneratorBundle\Renderer\RendererInterface interface. You can then configure this service as your desired rendering service in the config:, (*14)

# config.yml
thormeier_slides_generator:
    renderer_service: "acme.slides_renderer" # Replace `acme.slides_renderer` with your service ID

You could then, for instance, make a Twig renderer or something else entirely., (*15)

Replacing the whole generator

To replace the default generator, define a service that implements the Thormeier\SlidesGeneratorBundle\Generator\SlidesGeneratorInterface interface. You can then configure this service as your desired rendering service in the config:, (*16)

# config.yml
thormeier_slides_generator:
    generator_service: "acme.slides_generator" # Replace `acme.slides_generator` with your service ID

The Versions

18/08 2016

dev-master

9999999-dev

Symfony bundle for automated setup of slides

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pascal Thormeier

18/08 2016

0.0.1

0.0.1.0

Symfony bundle for automated setup of slides

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pascal Thormeier