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
File details
Details for the file python-pptx-templater-1.1.15.tar.gz
.
File metadata
- Download URL: python-pptx-templater-1.1.15.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47aba65b300499b0da4b466d3f8340713b597e0f5ea5be2b1559acc1fb15a83a |
|
MD5 | b5fef63a7904a6a348daa5762f241cd2 |
|
BLAKE2b-256 | 0bf5d21c97fdde17744b89c90e131ebaf47470bc3951302d1467c9cedd3ddb0d |
File details
Details for the file python_pptx_templater-1.1.15-py3-none-any.whl
.
File metadata
- Download URL: python_pptx_templater-1.1.15-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75bcf279d7cb510088fa0bc0602678d0735576b5218f9924d9096af2996f2460 |
|
MD5 | 2d4a83892cd86b5552e6d6fc15ea8f04 |
|
BLAKE2b-256 | 2705af74baa265449df217c382227197a03dfbf0205b4f33f299fa91d2439fb5 |