Render ppt like a jupyter notebook
Reason this release was yanked:
Released a full version instead of beta
Project description
PPTX Renderer
This package let's you run your powerpoint presentations like a jupyter-notebook. You can insert placeholders in the ppt and also write python code in the ppt's notes and use either a python function or an equivalent commandline tool to convert it into an output rendered presentation.
Below is a simple example.
from pptx_renderer import PPTXRenderer
p = PPTXRenderer("template.pptx")
someval = "hello"
def mymethod(abc):
return f"{abc} " * 5
myimage = r"is_it_worth_the_time.png"
mytable = [["a", "b", "c", "d", "e"]] * 10
p.render(
"output.pptx",
{
"someval": someval, "mymethod": mymethod, "myimage": myimage,
"mytable": mytable,
}
)
This will convert this
to this.
You can define some functions within the ppt itself by writing python code in the notes section of slides. And the variables and functions in this code can be used in the main ppt.
For example: write the following in one of the slide's notes.
```python def myfunc(input): return input * 42 ```
Now you can, for example, add the placeholder {{{myfunc(42)}}}
in your slides.
If the template ppt is a self contained python script ie: if it does not require variable values and function definition to be passed from outside, you can generate the output ppt directly from the commandline using the following command.
pptx-renderer input_template.pptx output_file.pptx
Installation
pip install pptx-renderer
Project details
Release history Release notifications | RSS feed
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
Hashes for pptx_renderer-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e36dc525ff3d9d7bacdeed1c9b044d7666fd20737a46acf721e5eeb1cf21854a |
|
MD5 | 36b05f86092f1d19cf13e61a85d59c82 |
|
BLAKE2b-256 | 7f6ec06972a67da03db65b31ff19b7e891565fb6fa8336a0449597ebb4441be6 |