PPTemp
PPTemp is a wrapper for python-pptx. It enables you to make powerpoint files in a simple python commands.
Installation
pip install git+https://github.com/Ameyanagi/pptemp
Usage
from pptemp import pptemp
# Initialization
presentation = pptemp()
# Initialization with template
presentation = pptemp(template="./sample/template.pptx")
# Title
presentation.add_title_slide("Title", "Subtitle")
# Create Blank Slide with title on the top
presentation.add_content_slide("Title of the slide")
# Create slides from figures
presentation.add_figure_slide()
# Create slides from figures with label
# Set use_bar=False if you don't want the bars to appear
presentation.add_figure_label_slide(dir_path="./sample/fig/*/")
presentation.add_figure_label_slide(dir_path="./sample/fig/*/", use_label=False)
# Save
presentation.save("./test.pptx")
add_figure_label_slide()
add_figure_slide() and add_figure_label_slide() are use to import figures automatically from the "./fig" directory.
It will search figures specified by dir_path and img_path.
dir_path = "./fig/*/"
img_path = "*.png"
By Default, the title of the slides are taken from the dir_path and img_path."_" and "." are used as a separator.
If dir_path = "./fig/01_test/", then the title will be "test".
If img_path = "01_test.png", then the label will be "test".
To change where to look for the title and label, you can use the following arguments.
file_regex = re.compile(r".*[_/\\](.*)\.[a-zA-Z]+")
dir_regex = re.compile(r".*[_/\\](.*)[/\\]")
Samples
# Basic sample
python sample1.py
# Samples using template-slides
# You need to prepare template pptx files without any slides. If there is a slide, new slides will be appended.
python sample2_using_template.py
Metadata
Release files for pptemp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pptemp-0.1.0.tar.gz | 7.5 kB | Without provenance | Details for pptemp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pptemp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pptemp-0.1.0-py3-none-any.whl |
Total release size: 14.9 kB
Release files / pptemp-0.1.0.tar.gz
| Download URL | pptemp-0.1.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83eaa9673de8d712f8f4f5a9329b35dabccfd91a757dd0575147a79b72b761cf
|
|
BLAKE2b-256 checksum How to use checksums |
60a34bec24ce0cf7177510470414c98a366d0ecac8042eada3a1784f014bde01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / pptemp-0.1.0-py3-none-any.whl
| Download URL | pptemp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7636f322e23c7f1ce29e1a95291d7d15432f2811ad0107758366f3f96ecff0a
|
|
BLAKE2b-256 checksum How to use checksums |
a81104396275223ff5449e88032d51527f7fb4513679936f70f1a11594ebc53e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Security for pptemp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.