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.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47aba65b300499b0da4b466d3f8340713b597e0f5ea5be2b1559acc1fb15a83a |
|
MD5 | b5fef63a7904a6a348daa5762f241cd2 |
|
BLAKE2b-256 | 0bf5d21c97fdde17744b89c90e131ebaf47470bc3951302d1467c9cedd3ddb0d |
Close
Hashes for python_pptx_templater-1.1.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75bcf279d7cb510088fa0bc0602678d0735576b5218f9924d9096af2996f2460 |
|
MD5 | 2d4a83892cd86b5552e6d6fc15ea8f04 |
|
BLAKE2b-256 | 2705af74baa265449df217c382227197a03dfbf0205b4f33f299fa91d2439fb5 |