闲社服务运行正常AI智能体自动化平台
p

PPT生成器

技能标识:pptx-generator

专业PPT生成器。Use when user wants to create editable PowerPoint presentations with professional layouts, multiple styles, and beautiful designs. Supports business, academic, creative styles. 可编辑PPT、幻灯片制作、演示文稿。

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.2
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

PPT生成器

PPT生成器

专业PPT生成器,创建可编辑、排版精美、多风格的PowerPoint演示文稿。

功能特点

  • - 📊 可编辑PPTX: 标准Office格式,可二次编辑
  • 🎨 多种风格: 商务、学术、创意、简约
  • 📐 精美排版: 专业布局,字体层次清晰
  • 📈 图表支持: 柱状图、折线图、饼图
  • 🖼️ 图片支持: 插入图片,自动排版
  • 📝 专业模板: 10+预制模板

支持的风格

风格适用场景特点
商务蓝商业汇报专业、稳重
学术白
学术论文 | 简洁、规范 | | 创意紫 | 创意展示 | 时尚、活力 | | 科技深 | 技术分享 | 现代、高端 | | 极简灰 | 通用场景 | 简约、百搭 |

使用方式

用户: 帮我做一个关于AI发展的PPT
用户: 生成商务风格的项目汇报PPT
用户: 做一个学术论文答辩PPT



Python代码实现

python
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PPALIGN, MSOANCHOR
from pptx.enum.shapes import MSO_SHAPE

class PPTGenerator:
def init(self, style=business_blue):
self.prs = Presentation()
self.style = style
self.colors = self.getcolors(style)
self.fonts = self.getfonts()

def getcolors(self, style):
获取配色方案
schemes = {
business_blue: {
primary: RGBColor(30, 60, 114),
secondary: RGBColor(70, 130, 180),
accent: RGBColor(255, 193, 7),
text: RGBColor(51, 51, 51),
bg: RGBColor(255, 255, 255)
},
academic_white: {
primary: RGBColor(0, 51, 102),
secondary: RGBColor(102, 102, 102),
accent: RGBColor(204, 0, 0),
text: RGBColor(51, 51, 51),
bg: RGBColor(255, 255, 255)
},
creative_purple: {
primary: RGBColor(102, 45, 140),
secondary: RGBColor(155, 89, 182),
accent: RGBColor(241, 196, 15),
text: RGBColor(51, 51, 51),
bg: RGBColor(248, 248, 255)
},
tech_dark: {
primary: RGBColor(30, 30, 30),
secondary: RGBColor(60, 60, 60),
accent: RGBColor(0, 200, 150),
text: RGBColor(240, 240, 240),
bg: RGBColor(20, 20, 25)
},
minimal_gray: {
primary: RGBColor(80, 80, 80),
secondary: RGBColor(150, 150, 150),
accent: RGBColor(0, 120, 215),
text: RGBColor(51, 51, 51),
bg: RGBColor(250, 250, 250)
}
}
return schemes.get(style, schemes[business_blue])

def getfonts(self):
获取字体配置
return {
title: Arial,
body: Arial,
chinese: Microsoft YaHei
}

def addtitleslide(self, title, subtitle=):
添加封面页
slide = self.prs.slides.addslide(self.prs.slidelayouts[6])

# 背景色
self.setslide_bg(slide, self.colors[bg])

# 标题
left, top, width, height = Inches(1), Inches(2), Inches(8), Inches(2)
txBox = slide.shapes.add_textbox(left, top, width, height)
tf = txBox.text_frame
tf.word_wrap = True

p = tf.paragraphs[0]
p.text = title
p.font.size = Pt(44)
p.font.bold = True
p.font.color.rgb = self.colors[primary]
p.alignment = PP_ALIGN.CENTER

# 副标题
if subtitle:
p2 = tf.add_paragraph()
p2.text = subtitle
p2.font.size = Pt(20)
p2.font.color.rgb = self.colors[secondary]
p2.alignment = PP_ALIGN.CENTER
p2.space_before = Pt(20)

return slide

def addcontentslide(self, title, bullets, layout=left):
添加内容页
slide = self.prs.slides.addslide(self.prs.slidelayouts[6])

# 背景色
self.setslide_bg(slide, self.colors[bg])

# 标题栏
self.addtitle_bar(slide, title)

# 内容区域
left, top, width, height = Inches(0.8), Inches(1.5), Inches(8.4), Inches(5)
txBox = slide.shapes.add_textbox(left, top, width, height)
tf = txBox.text_frame
tf.word_wrap = True

for i, bullet in enumerate(bullets):
p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
p.text = f• {bullet}
p.font.size = Pt(18)
p.font.color.rgb = self.colors[text]
p.space_after = Pt(12)

return slide

def addtwocolumnslide(self, title, leftcontent, right_content):
添加双栏内容页
slide = self.prs.slides.addslide(self.prs.slidelayouts[6])

self.setslide_bg(slide, self.colors[bg])
self.addtitle_bar(slide, title)

# 左栏
leftbox = slide.shapes.addtextbox(Inches(0.5), Inches(1.5), Inches(4.5), Inches(5))
lefttf = leftbox.text_frame
lefttf.wordwrap = True

for i, item in enumerate(left_content):
p = lefttf.paragraphs[0] if i == 0 else lefttf.add_paragraph()
p.text = f• {item}
p.font.size = Pt(16)
p.font.color.rgb = self.colors[text]
p.space_after = Pt(10)

# 右栏
rightbox = slide.shapes.addtextbox(Inches(5.2), Inches(1.5), Inches(4.5), Inches(5))
righttf = rightbox.text_frame
righttf.wordwrap = True

for i, item in enumerate(right_content):
p = righttf.paragraphs[0] if i == 0 else righttf.add_paragraph()
p.text = f• {item}
p.font.size = Pt(16)
p.font.color.rgb = self.colors[text]
p.space_after = Pt(10)

return slide

def addtableslide(self, title, headers, rows):
添加表格页
slide = self.prs.slides.addslide(self.prs.slidelayouts[6])

self.setslide_bg(slide, self.colors[bg])
self.addtitle_bar(slide, title)

# 创建表格
rows_count = len(rows) + 1
cols_count = len(headers)

left, top = Inches(0.5), Inches(1.8)
width, height = Inches(9), Inches(4)

tableshape = slide.shapes.addtable(rowscount, colscount, left, top, width, height)
table = table_shape.table

# 设置表头
for i, header in enumerate(headers):
cell = table.cell(0, i)
cell.text = header
cell.fill.solid()
cell.fill.fore_color.rgb = self.colors[primary]

for paragraph in cell.text_frame.paragraphs:
paragraph.font.size = Pt(14)
paragraph.font.bold

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 pptx-generator-1776016304 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 pptx-generator-1776016304 技能

通过命令行安装

skillhub install pptx-generator-1776016304

下载

⬇ 下载 pptx-generator v1.0.2(免费)

文件大小: 4.76 KB | 发布时间: 2026-4-13 11:35

v1.0.2 最新 2026-4-13 11:35
修复科技深配色对比度,添加图片/表格/形状支持说明
返回顶部