AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Pptx Processor

skill-hhhh124hhhh-skillmate-pptx-processor · by hhhh124hhhh

|

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-hhhh124hhhh-skillmate-pptx-processor

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-hhhh124hhhh-skillmate-pptx-processor)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
6mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Pptx Processor? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

PowerPoint 处理指南

概述

使用 Python 和命令行工具处理 PowerPoint 演示文稿。

核心功能

  • 创建新演示文稿
  • 修改现有幻灯片
  • 提取文本和内容
  • 合并/拆分演示文稿
  • 批量操作

Python 工具

python-pptx - 基本操作

创建新演示文稿
from pptx import Presentation

prs = Presentation()
title_slide = prs.slides.add_slide(prs.slide_layouts[0])
title = title_slide.shapes.title
subtitle = title_slide.placeholders[1]

title.text = "Hello, World!"
subtitle.text = "Created with python-pptx"

prs.save('hello.pptx')
添加文本和形状
from pptx import Presentation
from pptx.util import Inches, Pt

prs = Presentation()
blank_slide = prs.slides.add_slide(prs.slide_layouts[6])

# 添加文本框
left = top = width = height = Inches(1)
txBox = blank_slide.shapes.add_textbox(left, top, width, height)
tf = txBox.text_frame
tf.text = "This is text inside a textbox"

p = tf.add_paragraph()
p.text = "This is a second paragraph"
p.level = 1

prs.save('textbox.pptx')
添加图片
from pptx import Presentation
from pptx.util import Inches

prs = Presentation()
blank_slide = prs.slides.add_slide(prs.slide_layouts[6])

img_path = 'image.png'
left = top = Inches(1)
height = Inches(2)
pic = blank_slide.shapes.add_picture(img_path, left, top, height=height)

prs.save('image.pptx')
提取文本
from pptx import Presentation

prs = Presentation('presentation.pptx')

for slide in prs.slides:
    for shape in slide.shapes:
        if hasattr(shape, "text"):
            print(shape.text)

HTML 转 PowerPoint

使用 html2pptx

from html2pptx import Html2Pptx

html_content = """
Title
Slide content
"""

h2p = Html2Pptx()
h2p.html2pptx(html_content, 'output.pptx')

命令行工具

LibreOffice - 转换和批量操作

# 转换为 PDF
soffice --headless --convert-to pdf presentation.pptx

# 批量转换
for file in *.pptx; do
    soffice --headless --convert-to pdf "$file"
done

常见操作

合并演示文稿

from pptx import Presentation

def merge_presentations(files, output):
    merged = Presentation()
    for file in files:
        prs = Presentation(file)
        for slide in prs.slides:
            # 复制幻灯片
            slide_layout = merged.slide_layouts[0]
            new_slide = merged.slides.add_slide(slide_layout)
            # 复制内容(需要手动复制形状)
            for shape in slide.shapes:
                # 复制逻辑
                pass
    merged.save(output)

添加图表

from pptx import Presentation
from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE

prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[6])

chart_data = CategoryChartData()
chart_data.categories = ['East', 'West', 'Midwest']
chart_data.add_series('Series 1', (1, 2, 3))

x, y, cx, cy = Inches(2), Inches(2), Inches(6), Inches(4.5)
slide.shapes.add_chart(
    XL_CHART_TYPE.COLUMN_CLUSTERED, x, y, cx, cy, chart_data
)

prs.save('chart.pptx')

修改现有幻灯片

from pptx import Presentation

prs = Presentation('existing.pptx')
slide = prs.slides[0]

# 修改标题
slide.shapes.title.text = "New Title"

# 添加新形状
left = top = width = height = Inches(2)
slide.shapes.add_textbox(left, top, width, height)

prs.save('modified.pptx')

依赖要求

  • python-pptx: pip install python-pptx
  • html2pptx: pip install html2pptx
  • LibreOffice: 用于格式转换和批量操作

最佳实践

  • 保持简单:从基本结构开始
  • 使用模板:利用幻灯片布局
  • 测试兼容性:在不同 PowerPoint 版本中测试
  • 备份数据:修改前备份原始文件

常见陷阱

避免

  • ❌ 硬编码位置值(使用相对定位)
  • ❌ 忽略异常(添加错误处理)
  • ❌ 覆盖重要数据(修改前备份)

推荐

  • ✅ 使用模板和布局
  • ✅ 添加适当的错误处理
  • ✅ 测试跨平台兼容性
  • ✅ 保留原始文件备份

代码风格指南

重要:生成 PowerPoint 处理代码时:

  • 编写清晰、可读的代码
  • 使用描述性变量名
  • 添加适当的注释
  • 处理异常情况
  • 测试输出结果

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.