skip to navigation
skip to content

Not Logged In

pptshape 0.0.3

Extract images from PowerPoint presentation files for Sphinx.


Pptshape extracts shapes from ppt file and embeds to the sphinx document as png file.

pptshape adds new directive as follow.

.. ppt-shape:: abc.png
   :pptfilename: testppt.pptx
   :shapename: shape-title

First line of the directive specifies filename of image file to be generated. :pptfilename: specifies name of PowerPoint presentaion. :shapename: specifies name of shape you specified(see Usage).

When you build sphinx project on Windows box with PowerPoint installed, pptshape opens ppt file and create png file if ppt file is newer than image files.

If the project is build on PC PowerPoint is not installed or non-Windows box, ppt-shape directive behave just like as standard image directive.

The ppt-shape directive is derived from standard image directive, so you can use directives such as :height: or :alt: image directive has.


  1. Install pywin32 package to your Windows box.

  2. Create new presentation(.ppt) and draw shape.

  3. Select the shape you wrote and display format tab. Specify shape of name the shape at 'title' field.

  4. Save presentation file.

  5. In file of your Sphinx project, add following configuration.

    extensions = ['pptshape.directive']
  6. Add following lines in your .rst files.

    .. ppt-shape:: abc.png
       :pptfilename: testppt.pptx
       :shapename: shape-title

    abc.png is a name of png file to be created. :pptfilename: specifies name of PowerPoint presentaion. :shapename: specifies name of shape you specified at step 3.

  7. Build sphinx project.


  • Python 2.7/3.3 or later
  • pywin32 to generate png file.
File Type Py Version Uploaded on Size
pptshape-0.0.3.tar.gz (md5) Source 2014-03-28 4KB
  • Downloads (All Versions):
  • 2 downloads in the last day
  • 37 downloads in the last week
  • 486 downloads in the last month