Create customization PowerPoint Presentation (.pptx) using a predefined layout template
Project description
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
Using Template JSON:
{
'slides': [
{
'layoutSlideNum': 0,
'text': {
'name': 'Paul'
}
},
{
'layoutSlideNum': 0,
'text': {
'name': 'Joe'
}
},
{
'layoutSlideNum': 1,
'text': {
'dog': {
'name': 'John Cena'
}
}
},
]
}
Output
Install
pip install python-pptx-templater
Usage
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for python-pptx-templater-1.1.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 354126b3dc102b10b31dd6f2a6ff37f93d5f45fa6aa5726a6fdf57f6ed350ad9 |
|
MD5 | 106ebad7e376450874e3fe062076d06f |
|
BLAKE2b-256 | 3427cfa75cc9ceece51bbdfc483a3ae4a66cf7254481314648594d2a8f502908 |
Close
Hashes for python_pptx_templater-1.1.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68d219c70fe800e5179277631fdb84d2e0064cd5b365bfa69c0f11ac9a1cb466 |
|
MD5 | c6a835d0e1cd7c01342a7ccde74b6206 |
|
BLAKE2b-256 | f6a2056a9600acb9f9c7c7bb2eda1c7bff1273a4d56e891304af81d5ebf1725f |