Free Ruby Library to Create & Convert Presentation & Slides
Open Source Ruby API to Create, Edit, and Convert PowerPoint PPT and PPTX Presentations and Slides to to PDF, PowerPoint, or Slide Decks.
What is TTP Library?
In the world of software development, open-source libraries are invaluable resources that empower developers to build efficient, scalable, and innovative applications. One such gem in the Ruby ecosystem is the TPP Ruby Library hosted on GitHub. It is an open source Ruby presentation library that empowers software developers, educators, and speakers alike to craft beautiful, interactive slide decks using Ruby’s expressive syntax. Rather than relying on traditional slide editing software, TPP allows developers to define slides and transitions programmatically. This approach not only promotes reusability and maintainability but also lets you incorporate dynamic content and interactive elements with ease.
The TPP Ruby Presentation Library is an open-source project designed to simplify the creation and manipulation of presentation files programmatically. Developed by Christopher Browne, this library allows developers to generate presentations in various formats, such as PDF, PowerPoint, or slide decks, using Ruby code. Software developers can create dynamic slides, create customizable themes and styles, define common slide elements, embed interactive elements, seamless integration with command-line tools and so on. By exploring its features and integrating it into your projects, you can unlock new possibilities and streamline your presentation creation process. Whether you want to generate a static HTML presentation or run your slides in a terminal, TPP offers the versatility to suit your needs.
Getting Started with 'TPP'
The recommend way to install TPP Ruby library is using Ruby gem. Please use the following command for a smooth installation.
Install 'TPP' via Ruby gem
gem install TPP
Install TPP Ruby library via GitHub
git clone https://github.com/cbbrowne/tpp.git
Slide Creation via Ruby Library
The open source TPP Ruby Presentation Library allows software developers to create slides programmatically, making it easy to generate presentations dynamically. You can define slide layouts, add text, images, and other elements, and customize the appearance of each slide. Here is a simple example that shows how software developers can create a simple slide using Ruby commands.
How to Create a Simple Slide via Ruby Library
require 'tpp'
presentation = TPP::Presentation.new
# Add a title slide
presentation.add_slide do |slide|
slide.title = "Welcome to the TPP Ruby Presentation Library"
slide.subtitle = "Creating Presentations Programmatically"
slide.background_color = "#f0f0f0"
end
# Add a content slide
presentation.add_slide do |slide|
slide.title = "Key Features"
slide.add_bullet_point("Programmatic slide creation")
slide.add_bullet_point("Customizable layouts")
slide.add_bullet_point("Export to multiple formats")
end
# Save the presentation
presentation.save("my_presentation.pdf")
Presentations Export to Other Formats via Ruby
The TPP (text presentation program) Ruby Presentation Library makes it easy for software developers to load and export their presentations to multiple formats, including PDF, PowerPoint, image and many more. This features is very useful and makes it easy to share your presentations with others or integrate them into other workflows. The following example demonstrates how to export your Presentations to PowerPoint PPTX file format inside Ruby applications.
How to Export Presentations to PowerPoint PPTX file via Ruby Library?
require 'tpp'
presentation = TPP::Presentation.new
# Add a title slide
presentation.add_slide do |slide|
slide.title = "Exporting to PowerPoint"
slide.subtitle = "Using the TPP Ruby Presentation Library"
end
# Export to PowerPoint format
presentation.save("presentation.pptx")
Dynamic Content Generation
The open source library TPP library makes it easy for programmers to generate presentation’s slides dynamically based on data using Ruby code. This is particularly useful for creating reports or presentations that require up-to-date information. Here is a very useful example demonstrating how programmers can generate Slides from data using Ruby library.
How to Generate Presentation Slides from Data inside Ruby Apps?
require 'tpp'
data = [
{ title: "Quarter 1", revenue: 100000 },
{ title: "Quarter 2", revenue: 120000 },
{ title: "Quarter 3", revenue: 150000 }
]
presentation = TPP::Presentation.new
data.each do |quarter|
presentation.add_slide do |slide|
slide.title = quarter[:title]
slide.add_content("Revenue: $#{quarter[:revenue]}")
end
end
# Save the presentation
presentation.save("quarterly_report.pdf")
Customizable Slide Layouts
The TPP (text presentation program) Ruby Presentation Library provides flexibility in designing slide layouts inside Ruby applications. You can define custom layouts for different types of slides, such as title slides, content slides, or image-focused slides.