Giter VIP home page Giter VIP logo

pptx_converter's Introduction

pptx_converter

Converts a single PPTX file into multiple *.html files for reveal.js

#Configure constants

  • Define the following constants according to your own configuration:
define('PATH_TO_XML', __DIR__);
define('TARGET_HTML_DIR', __DIR__ . '/../reveal.js');
define('IMAGE_URL', '/img');
define('SECTION_BACKGROUND' , 'background.png');
define('OPENING_BACKGROUND', 'title.png');
define('SECTION_PREFIX', 'section_');
define('SLIDE_TEMPLATE', __DIR__ . '/slide_template.html');
define('SLIDE_CONTAINER_CLASS', 'slide_container');
define('SLIDE_TEXT_CLASS', 'slide_text');
define('SLIDE_IMAGE_CLASS', 'slide_image');
  • Go through the PPTX slide deck and determine section titles + starting slide for that section
  • Define $sections
$sections = [
	 0 => ['title' => 'Intro', 'end' => 10],
	 1 => ['title' => 'Setup and Configuration', 'end' => 47],
	 2 => ['title' => 'Question and Answer', 'end' => 99],
];

#Define the slide template

  • Have a look at the sample file "slide_template.html"
  • Assign this to SLIDE_TEMPLATE
  • Make sure you have your CSS files in place

#Unzip PPTX files

  • Use your favorite unzip utility to open up the PPTX file
  • Copy the entire directory structure for "/ppt/slides/*" into PATH_TO_XML
  • Be sure to also copy "/ppt/slides/_rels/* into PATH_TO_XML
  • Copy "/media/*" into the folder which IMAGE_URL refers to

#Perform the conversion

  • Run this command:
php convert.php

pptx_converter's People

Contributors

dbierer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.