用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/hhhh124hhhh/SkillMate --skill pptx-processor命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
帮我生成封面图和视觉内容
帮我找热门创作话题
内容插图规划工具。当用户说"给文章配图"、"为文章生成插图"、"文章配图"、 "分析文章并配图"、"自动插图"、"为文章生成配图"时触发此技能。 工作流程: 1. 读取文章内容(read_file) 2. 分析需要插图的位置 3. 选择合适的风格(14种风格可选) 4. 调用 image-generation 技能生成图片 5. 更新文章,插入图片引用 支持风格:tech、fresh、minimal、warm、business、elegant、bold、 playful、nature、sketch、notion(默认)
基于 SOC 职业分类
正在显示 SKILL.md
| name | pptx-processor |
| description | PowerPoint 处理工具 - 演示文稿的创建、编辑和分析。 支持创建新演示文稿、修改现有幻灯片、提取内容、合并演示文稿。当用户需要:创建 PPT、编辑幻灯片、提取内容时触发此技能。 |
使用 Python 和命令行工具处理 PowerPoint 演示文稿。
核心功能:
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)
from html2pptx import Html2Pptx
html_content = """
<h1>Title</h1>
<p>Slide content</p>
"""
h2p = Html2Pptx()
h2p.html2pptx(html_content, 'output.pptx')
# 转换为 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')
pip install python-pptxpip install html2pptx避免:
推荐:
重要:生成 PowerPoint 处理代码时: