Skip to content

Spydr-Digital/powerpoint

 
 

Repository files navigation

‘powerpoint’ gem – for creating PowerPoint Slides in Ruby.

‘powerpoint’ is a Ruby gem that can generate PowerPoint files(pptx).

This fork has been modified for FF powerpoint generation from the page builder. It also includes use of SF htmltoooxml to enable display of basic html markup in pptx docs.

Installation

‘powerpont’ can be used from the command line or as part of a Ruby web framework. To install the gem using terminal, run the following command:

gem install powerpoint

To use it in Rails, add this line to your Gemfile:

gem "powerpoint"

Basic Usage

‘powerpoint’ gem can generate a PowerPoint presentaion based on a standard template:

require 'powerpoint'

@deck = Powerpoint::Presentation.new

# Creating an introduction slide:
title = 'Title of the trend'
subtitle = 'trend subtitle'
image_path = '/local/file/path/to/featured/image.png'

@deck.add_ff_trend_intro_slide title, subtitle, image_path

# now use the various slide methods seen in spec/test_spec.rb to interface with the page_builder.json to build out the pptx

@deck.save('test.pptx')

Compatibility

‘powerpoint’ gem has been tested with LibreOffice(4.2.1.1) and Apache OpenOffice(4.0.1) on Mac OS X Mavericks, Microsoft PowerPoint 2010 on Windows 7 and Google Docs(latest version as of March 2014).

Tests

You can see sample output by runnign the tests

> rake

Bug Reporting

About

Creates Powerpont presentation in Ruby.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 53.4%
  • Ruby 39.0%
  • XSLT 7.6%