Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

python-pptx-templater

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-pptx-templater

Create customizable PowerPoint Presentation (.pptx) using a predefined layout template

  • 1.1.15
  • PyPI
  • Socket score

Maintainers
1

python-pptx-templater

python-pptx-templater is a tool to create highly customizable PowerPoint presentation using the jinja template languages. User specifies the layouts and placeholders and the template will render the presentation.

Example

Input

.. image:: https://raw.githubusercontent.com/kwlo/python-pptx-templater/master/docs/static/images/sample_input.png

Using Template JSON:

.. code-block:: text

{
    'slides': [
        {
            'layoutSlideNum': 0,
            'text': {
                'name': 'Paul'
            }
        },
        {
            'layoutSlideNum': 0,
            'text': {
                'name': 'Joe'
            }
        },
        {
            'layoutSlideNum': 1,
            'text': {
                'dog': {
                    'name': 'John Cena'
                }
            }
        },
    ]
}

Output

.. image:: https://raw.githubusercontent.com/kwlo/python-pptx-templater/master/docs/static/images/sample_output.png

Install

.. code-block:: text

pip install python-pptx-templater

Usage

.. code-block:: text

from pptx_templater.core import convert


def test_conversion():
    currpwd = os.path.dirname(os.path.abspath(__file__))
    srcpath = f'{currpwd}/fixtures/test_presentation_layout.pptx'
    destpath = f'{currpwd}/test_outputs/updated.pptx'

    j = {
        'slides': [
            {
                'layoutSlideNum': 0,
                'text': {
                    'name': 'Paul'
                }
            },
            {
                'layoutSlideNum': 0,
                'text': {
                    'name': 'Joe'
                }
            },
            {
                'layoutSlideNum': 1,
                'text': {
                    'dog': {
                        'name': 'John Cena'
                    }
                }
            },
        ]
    }

    convert(srcpath, destpath, j)

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc