jongalloway / jongalloway/pptx-tools

Enhancement: Add Rename action to pptx_manage_layouts

Open
#169 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement phase-2 priority:p1 squad:copilot type:feature
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.