SkillHub

tiangong-wps-ppt-automation

v0.1.0

Automate common PowerPoint/WPS Presentation operations on Windows via COM (read text/notes/outline, export PDF/images, replace text, insert/delete slides, unify font/size/theme, extract images/media). Use for single-presentation actions (no batch).

Sourced from ClawHub, Authored by Fadeloo

Installation

Please help me install the skill `tiangong-wps-ppt-automation` from SkillHub official store. npx skills add Fadeloo/tiangong-wps-ppt-automation

WPS/PowerPoint Automation (Windows)

Use the bundled Python script to control PowerPoint or WPS Presentation via COM.

Requirements

  • Windows with Microsoft PowerPoint or WPS Presentation installed.
  • Python + pywin32 (python -m pip install pywin32).

Quick start

python {baseDir}/scripts/wps_ppt_automation.py read --input "C:pathfile.pptx"
python {baseDir}/scripts/wps_ppt_automation.py export --input "C:pathfile.pptx" --format pdf --output "C:pathout.pdf"

Commands

read

Extract all slide text.

python {baseDir}/scripts/wps_ppt_automation.py read --input "C:pathfile.pptx" --output "C:pathout.txt"

notes

Extract speaker notes.

python {baseDir}/scripts/wps_ppt_automation.py notes --input "C:pathfile.pptx" --output "C:pathnotes.txt"

outline

Export slide titles as outline.

python {baseDir}/scripts/wps_ppt_automation.py outline --input "C:pathfile.pptx" --output "C:pathoutline.txt"

export

Export to PDF or images (PNG).

python {baseDir}/scripts/wps_ppt_automation.py export --input "C:pathfile.pptx" --format pdf --output "C:pathout.pdf"
python {baseDir}/scripts/wps_ppt_automation.py export --input "C:pathfile.pptx" --format images --outdir "C:outslides"

replace

Find/replace text across slides.

python {baseDir}/scripts/wps_ppt_automation.py replace --input "C:pathfile.pptx" --find "old" --replace "new" --save "C:pathout.pptx"

slides

Insert or delete slides.

python {baseDir}/scripts/wps_ppt_automation.py insert-slide --input "C:pathfile.pptx" --index 2 --save "C:pathout.pptx"
python {baseDir}/scripts/wps_ppt_automation.py delete-slide --input "C:pathfile.pptx" --index 3 --save "C:pathout.pptx"

font

Unify font name/size across slides.

python {baseDir}/scripts/wps_ppt_automation.py font --input "C:pathfile.pptx" --name "Microsoft YaHei" --size 20 --save "C:pathout.pptx"

theme

Apply a theme (.thmx).

python {baseDir}/scripts/wps_ppt_automation.py theme --input "C:pathfile.pptx" --theme "C:paththeme.thmx" --save "C:pathout.pptx"

extract-images

Export embedded images.

python {baseDir}/scripts/wps_ppt_automation.py extract-images --input "C:pathfile.pptx" --outdir "C:outimages"

Notes

  • If WPS is installed, try --app wps; otherwise default uses PowerPoint.
  • Use --visible true if you need to watch the UI.
  • Avoid batch usage; this skill is for single-presentation operations.