jongalloway / jongalloway/pptx-tools
Enhancement: Add Rename action to pptx_manage_layouts
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Summary
pptx_manage_layouts currently supports Find and Remove actions but not Rename. Renaming layouts is one of the most common operations when preparing templates for tools like MarpToPptx, which match layout: directives against layout names.
Use case
Corporate/conference templates from design teams often use non-standard layout names like "Headline", "2 blocks text", or "Section title". These need to be renamed to conventional PowerPoint names that downstream tools recognize (e.g., "Title and Content", "Two Content", "Section Header").
In the template-optimization workflow that motivated this issue, 8 layouts needed renaming. Without a Rename action, this required writing a custom C# script using the OpenXML SDK directly.
Proposed API
{
"filePath": "template.pptx",
"action": "Rename",
"layoutName": "Headline",
"newName": "Title and Content"
}
Or for batch operations:
{
"filePath": "template.pptx",
"action": "Rename",
"renames": {
"Headline": "Title and Content",
"2 blocks text": "Two Content",
"Section title": "Section Header"
}
}
Implementation notes
The rename operation sets SlideLayout.CommonSlideData.Name. It should also update SlideLayout.MatchingName if that attribute is populated, since both are used for name matching by different tools.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the pptx_manage_layouts action handler and its existing Find and Remove paths. Inspect how SlideLayout.CommonSlideData.Name and MatchingName are read or written, then verify the proposed single and batch Rename inputs. Done means matching layouts can be renamed and both name attributes are updated when MatchingName is populated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100