pptx-template
pptx-template copied to clipboard
[Improvement] use Jinja2 templating scheme
Hi, thank you for your work, this is indeed VERY helpful.
This could be great to turn tempalting scheme into Jinja2 one (http://jinja.pocoo.org/docs/2.10/)
The best feature could be case control and iteration with Jinja, just like (in a PPTX file) :
----
Here are the list of to-dos :
{% for entry in hello.entries %}
- TODO: {{entry}}
{%endfor%}
@moutonjr I don't know, but I think it's easier to do it at the Python level,
let's say so:
pptx.app(slide(
template='template_name', # Slide id
data={
'hello': {
'entries': [1, 2, 3, 4]
}
}
))
.pptx is not html :(
For Jinja2 template scheme, see https://github.com/kwlo/python-pptx-templater.
@skar404 Doing this at a Python level will not create the desired number or row in a table. I don't think that pptx-template will generate as many rows as you specified in the entries list.