📄 editing.md

← Vault

Editing Presentations

Template-Based Workflow

When using an existing presentation as a template:

1. Analyze existing slides:

`bash

python scripts/thumbnail.py template.pptx

python -m markitdown template.pptx

`

Review thumbnails.jpg to see layouts, and markitdown output to see placeholder text.

2. Plan slide mapping: For each content section, choose a template slide.

⚠️ USE VARIED LAYOUTS — monotonous presentations are a common failure mode. Don't default to basic title + bullet slides. Actively seek out:

- Multi-column layouts (2-column, 3-column)

- Image + text combinations

- Full-bleed images with text overlay

- Quote or callout slides

- Section dividers

- Stat/number callouts

- Icon grids or icon + text rows

Avoid: Repeating the same text-heavy layout for every slide.

Match content type to layout style (e.g., key points → bullet slide, team info → multi-column, testimonials → quote slide).

3. Unpack: python scripts/office/unpack.py template.pptx unpacked/

4. Build presentation (do this yourself, not with subagents):

- Delete unwanted slides (remove from )

- Duplicate slides you want to reuse (add_slide.py)

- Reorder slides in

- Complete all structural changes before step 5

5. Edit content: Update text in each slide{N}.xml.

Use subagents here if available — slides are separate XML files, so subagents can edit in parallel.

6. Clean: python scripts/clean.py unpacked/

7. Pack: python scripts/office/pack.py unpacked/ output.pptx --original template.pptx


Scripts

unpack.py

`bash

python scripts/office/unpack.py input.pptx unpacked/

`

Extracts PPTX, pretty-prints XML, escapes smart quotes.

add_slide.py

`bash

python scripts/add_slide.py unpacked/ slide2.xml # Duplicate slide

python scripts/add_slide.py unpacked/ slideLayout2.xml # From layout

`

Prints to add to at desired position.

clean.py

`bash

python scripts/clean.py unpacked/

`

Removes slides not in , unreferenced media, orphaned rels.

pack.py

`bash

python scripts/office/pack.py unpacked/ output.pptx --original input.pptx

`

Validates, repairs, condenses XML, re-encodes smart quotes.

thumbnail.py

`bash

python scripts/thumbnail.py input.pptx [output_prefix] [--cols N]

`

Creates thumbnails.jpg with slide filenames as labels. Default 3 columns, max 12 per grid.

Use for template analysis only (choosing layouts). For visual QA, use soffice + pdftoppm to create full-resolution individual slide images—see SKILL.md.


Slide Operations

Slide order is in ppt/presentation.xml.

Reorder: Rearrange elements.

Delete: Remove , then run clean.py.

Add: Use add_slide.py. Never manually copy slide files—the script handles notes references, Content_Types.xml, and relationship IDs that manual copying misses.


Editing Content

Subagents: If available, use them here (after completing step 4). Each slide is a separate XML file, so subagents can edit in parallel. In your prompt to subagents, include:

ScriptPurpose
-----------------
unpack.pyExtract and pretty-print PPTX
add_slide.pyDuplicate slide or create from layout
clean.pyRemove orphaned files
pack.pyRepack with validation
thumbnail.pyCreate visual grid of slides
CharacterNameUnicodeXML Entity
--------------------------------------
Left double quoteU+201C
Right double quoteU+201D
Left single quoteU+2018
Right single quoteU+2019

Other

  • - Whitespace: Use xml:space="preserve" on with leading/trailing spaces
  • - XML parsing: Use defusedxml.minidom, not xml.etree.ElementTree (corrupts namespaces)