Metadata-Version: 2.4
Name: xmlppt
Version: 0.1.0
Summary: PowerPoint editing via Open XML package manipulation
Author: Your Name
License-Expression: MIT
Project-URL: Homepage, https://github.com/jlondon626/powerpoint_editor
Project-URL: Repository, https://github.com/jlondon626/powerpoint_editor
Keywords: pptx,powerpoint,openxml,slides,excel
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: lxml>=4.0.0
Requires-Dist: openpyxl>=3.0.0
Requires-Dist: pywin32>=306; sys_platform == "win32"

# xmlppt

A small utility package for editing PowerPoint (.pptx) files by
manipulating the Open XML package directly. It supports duplicating
template slides, editing named textboxes, updating embedded Excel
workbooks for charts, and basic listing/debug utilities.

This repository contains a single package `xmlppt` with the main
implementation in `xmlppt/editor.py` and a minimal `main.py` example
entrypoint.

Requirements
- Python 3.10+
- lxml
- openpyxl
- pywin32 (only required for `refresh_chart()` on Windows)

Install

Create a virtual environment and install dependencies:

```bash
python -m venv .venv
.venv\Scripts\Activate.ps1   # Windows PowerShell
pip install -r requirements.txt
```

Install the package locally for development:

```bash
pip install -e .
```

Quick usage (programmatic)

```python
from xmlppt import PowerPointEditor

editor = PowerPointEditor('input.pptx')
editor.duplicate_template_slide('RESERVE_WATERFALL')
editor.edit_textbox_html('AOM Text', '<b>Updated</b>')
editor.save('output.pptx')
```

CLI example

Run the example entrypoint which shows basic diagnostics and attempts
to run a sample flow (expects a marker template slide):

```bash
python main.py --input example.pptx --run-example
```

Run tests

```bash
pytest -q
```

CI

A GitHub Actions workflow is included at `.github/workflows/python-package.yml`
that installs the package and runs the test suite on Windows.

Publishing

A release workflow is included at `.github/workflows/publish.yml`.
When you create a GitHub release and publish it, the workflow will build
and upload the package to PyPI using the `PYPI_API_TOKEN` secret.

To configure publishing:

1. Create a PyPI API token at https://pypi.org/manage/account/token/
2. Add it to your repository secrets as `PYPI_API_TOKEN`
3. Create a release on GitHub

Notes
- The `refresh_chart()` function uses COM automation to refresh chart
  visuals inside PowerPoint; this only works on Windows with PowerPoint
  installed.
- The package manipulates the raw PPTX (zip) contents; always test on
  copies of presentations before running on production files.
