Create customizable 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.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86cf448194b34c2c58dfd846ab45d0d8c5412d13380ca98a76861a4a1918da7f |
|
MD5 | 22271704a4163f2a81cf889006f46f28 |
|
BLAKE2b-256 | 54fc76034e49156c856bfd0aaf3256bb23826d810b8459c8a85595550fb85041 |
Close
Hashes for python_pptx_templater-1.1.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9b07e6fa0ac89e193acb44408200ea7447a609ff2a2186b3ea7d92a0d6ee914 |
|
MD5 | 240a569ef2ef3c1ffde3c209fa75606e |
|
BLAKE2b-256 | fb78948e9805c88b273ccb5ca661bc3a1d0a0107baee8718aeb571d6578dd184 |