Metadata-Version: 2.4
Name: fred-capability-ppt-filler
Version: 4.5.0
Summary: Fred agent capability: fill an uploaded PowerPoint template from chat (ppt_filler).
Author-email: Thales <noreply@thalesgroup.com>
License: Apache-2.0
Project-URL: Homepage, https://site.fredlab.dev
Project-URL: Repository, https://github.com/ThalesGroup/fred
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Requires-Python: <3.13,>=3.12
Description-Content-Type: text/markdown
Requires-Dist: fred-core>=4.5.0
Requires-Dist: fred-sdk[agents]>=4.5.0
Requires-Dist: pydantic<3.0.0,>=2.7.0
Requires-Dist: python-pptx>=1.0.2
Requires-Dist: Pillow>=10.0.0
Requires-Dist: langchain-core>=0.3.0
Requires-Dist: langchain>=0.3.0
Requires-Dist: fastapi>=0.110
Requires-Dist: python-multipart>=0.0.9
Provides-Extra: dev
Requires-Dist: bandit>=1.8.6; extra == "dev"
Requires-Dist: basedpyright==1.31.0; extra == "dev"
Requires-Dist: detect-secrets>=1.5.0; extra == "dev"
Requires-Dist: pytest>=8.4.2; extra == "dev"
Requires-Dist: pytest-asyncio>=1.2.0; extra == "dev"
Requires-Dist: pytest-cov>=6.2.1; extra == "dev"
Requires-Dist: pytest-socket>=0.7.0; extra == "dev"
Requires-Dist: ruff>=0.12.5; extra == "dev"

# fred-capability-ppt-filler

Fred agent capability that fills an uploaded PowerPoint template from chat.

An author uploads a `.pptx` whose slides carry `{key}` or `{{key}}` placeholders and whose
slide notes describe each key (a `{key}:` or `{{key}}:` header plus prose, optional
`- type: image` / `- folder: ...` metadata for picture keys). The capability
parses and validates the template, then gives the agent a fill tool that
substitutes the keys - honoring inline Markdown (`**bold**` / `*italic*`) in the
substituted values - and produces a downloadable, filled deck.

This package holds the pure, offline core: the template parser/validator, the
shared text-frame traversal (list + replace), the image-anchor geometry seam, and
the folder-resolution / image-location validation layer.

## Template markers

Single and double braces identify the same case-sensitive key. Mix either form
between slides and notes, including multi-key headers such as `{first}, {{last}}:`
and image markers. Leading/trailing key whitespace is ignored. The single-brace
form requires at least one character and no braces inside the key. Double-brace recognition retains its legacy rule: the key is everything
up to the first closing brace, followed by two closing braces. No extra syntax
validation is introduced for existing templates.

Markers split across runs in one paragraph are supported in text boxes, table
text, and grouped shapes. Images use the containing shape's placement box;
table cells remain invalid image locations. Chart text and SmartArt are unsupported.

## Spec

The current template contract is in
[`openspec/specs/ppt-filler/spec.md`](../../../openspec/specs/ppt-filler/spec.md).
Author help: [English](../../../apps/frontend/public/ppt-filler-help.md) and
[French](../../../apps/frontend/public/ppt-filler-help.fr.md).

## Registration

Installing this package *is* the registration: the fred-agents pod auto-discovers
the capability at boot via the `fred.capabilities` entry point declared in
`pyproject.toml` (`ppt_filler = "fred_capability_ppt_filler.capability:PptFillerCapability"`).
