Skip to main content

Uses pptx templates and a context dictionary file to replace keywords

Project description

PowerPoint Template Engine

Use PowerPoint templates to generate PowerPoint files on the fly using "magic words". Magic words are specified by using the $ sign symbol. This keyword becomes a special reserved symbol. If this magic symbol is not suitable, it can be changed within the script. You can specify magic words in PowerPoint templates by wrapping the word like $this$. The data is opulated by using a "context" object. A context object is a dictionary which contains the keywords and thier values that are used to populate the powerpoint. Additionally, tables can be populated with an unlmited number of related data by specifying a list of dictionaries in your context.

There are two methods to run this tool:

COMMAND LINE & CONFIG FILE: The tool expects a config file which contains the input pptx template file with magic words and an output pptx file. Additionally, a context file must be specified. Example: main.py --config "path\\to\\config\\file.json" --context "path\\to\\context_file.json"

CALLED FROM ANOTHER PYTHON FILE: You can import the library and then call parse_template_ppt(ppt, context, output_path)

To prepare to run the script, download or clone the repo to your local machine. Then use the command line to install the requirements in your desired Python environment using pip: pip install -r /path/to/requirements.txt

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

templatepptx-0.0.1.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

templatepptx-0.0.1-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page