Skip to main content

AutoPPTX

alt text

AutoPPTX is a Python toolkit for automated editing of PowerPoint templates using the python-pptx library.
It is designed for data scientists, researchers, and business analysts who want to automate slide generation from structured data such as JSON files.

AutoPPTX supports intelligent replacement and styling of text, image, and table placeholders in PowerPoint templates.


Features

  • ✅ Multi-type placeholder replacement
    Replace titles, subtitles, body text, images, and tables with structured data.

  • 🎨 Styling Support
    Supports style extraction, style application, and style transfer across text boxes, tables, and images — including font, alignment, background color, position, size...

  • 🔍 Placeholder type recognition and content inspection
    Identify and inspect placeholder types (text, image, table) and their content.

  • 🧩 Modular architecture
    Well-structured codebase with separate modules for Text, Image, Table, Type, and View.

  • 🧪 Tested and standardized
    Includes unit tests and conforms to PEP8 and black code formatting.


📽️ Demo Preview

The following animation demonstrates how AutoPPTX replaces placeholders and styles text, images, and tables based on JSON input:

AutoPPTX Demo


Requirements

  • Python >= 3.10
  • python-pptx >= 1.0.2
  • lxml >= 5.3.1

Installation

# For regular usage
pip install autopptx

# For development (includes test dependencies)
pip install -e ".[dev]"

Usage

CLI Example

python -m autopptx.core.runner \
    --template ./data/template.pptx \
    --input ./data/input_data.json \
    --output ./data/output_demo.pptx

Python API Example

from autopptx.core.runner import main

main(
    template_path="./data/template.pptx",
    input_json="./data/input_data.json",
    output_path="./data/output_demo.pptx",
)

Example Input (input_data.json)

[
  {
    "title": "What They Eat",
    "subtitle": "Table 1",
    "bodytext": "Cats need protein-rich diets, primarily consisting of meat.",
    "table": [
      [
        ["Animal", "Favorite Food"],
        ["Cat", "Fish, Meat"],
        ["Bunny", "Carrots, Hay"]
      ]
    ]
  }
]

Project Structure

AutoPPTX/
├── autopptx/             # 📦 Main Python package
│   ├── Text/             # Text replacement & style
│   ├── Image/            # Image replacement & layout
│   ├── Table/            # Table replacement & formatting
│   ├── Type/             # Placeholder type detection
│   ├── View/             # Slide viewer tools
│   └── core/             # CLI runner entry point
├── data/                 # Example JSON and PPTX templates
├── assets/               # README media (GIFs, images)
├── tests/                # Unit tests
├── env.sh                # Environment setup script
├── pyproject.toml        # Build & packaging configuration
├── MANIFEST.in           # Packaging resource includes
├── requirements.txt      # Python dependencies list
├── .gitignore            # Git ignore rules
├── LICENSE               # MIT License
└── README.md             # Project documentation

Development

Clone the repo and set up:

git clone https://github.com/chenzhex/AutoPPTX.git
cd AutoPPTX
pip install -e ".[dev]"

Code Formatting

black autopptx tests

Running Tests

pytest tests/ --cov=autopptx

Contributing

Contributions, issues, and feature requests are welcome!
Please open a GitHub Issue or submit a Pull Request.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Citation

If you use AutoPPTX in your research, please cite the following JOSS paper:

@article{chen2025autopptx,
  title   = {AutoPPTX: Automated PowerPoint Generation with Python},
  author  = {Chen, Zhe},
  journal = {Journal of Open Source Software},
  year    = {2025},
  note    = {Submitted}
}

AutoPPTX simplifies and streamlines automated slide generation for reproducible research and business reporting.

Metadata

Release files for autopptx 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autopptx 1.0.0
File Size Uploaded
autopptx-1.0.0.tar.gz 1.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for autopptx 1.0.0
File Interpreter ABI Platform
autopptx-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.6 MB

Release files / autopptx-1.0.0.tar.gz

Download URL autopptx-1.0.0.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
0074f3c85e092c0c10a550841b8c10f99ed3a22d62305db52548c844f916a287
BLAKE2b-256 checksum
How to use checksums
510339626339446463c3c47380e6e713b94b37e1689164402a86d01f937be397
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.9

Release files / autopptx-1.0.0-py3-none-any.whl

Download URL autopptx-1.0.0-py3-none-any.whl
Size 1.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b5fb58b7f6dfbe0a541cd3cfff7dc0595de5fa4d6f32fedf0dc21abe51b0037d
BLAKE2b-256 checksum
How to use checksums
bcc9ee6a82caae4ee951b901aef574c5ab1d78cf6f822f7089316b54076701bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.9

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page