Ppt Light Corporate

👤 ksfrist 📦 v1.1.1 ⭐ 0.0 ⬇️ 660 下載
📄 辦公效率 免費

📖 技能介紹


name: ppt-light-corporate version: 1.1.0 description: | Generate polished corporate PPTs using a light-themed company template. Activate when: (1) User asks to create/make/generate a PPT/PowerPoint/幻燈片/簡報 (2) User provides content and wants it turned into slides (3) User asks to improve or redo a PPT Uses a pre-analyzed H3C-style light corporate template (white bg + China red accent). NOT for: dark theme PPTs, creative/artistic decks, or Keynote files.


PPT Light Corporate Skill

基於 python-pptx 的企業PPT自動生成引擎。H3C淺色企業模板,白底+中國紅點綴,16:9畫布。

核心檔案

檔案 作用
assets/template-light.pptx 模板檔案(10" × 5.625",9種Layout,5個母版)
assets/icons-library.pptx 279個簡潔向量圖示(裝置相關)
assets/icon-index.json 圖示語義索引(中英文標籤+場景分類)
scripts/ppt_helpers.py 核心生成引擎(24種內容佈局 + 工具方法)
scripts/ppt_qa.py 自動QA審校(9項檢查)
scripts/ppt_scorer.py 評分系統(逐頁6維 + 整體4維 + 學習迴圈)
scripts/icon_library.py 圖示搜尋/複製/變色引擎

Quick Start

import sys
sys.path.insert(0, '<skill_dir>/scripts')
from ppt_helpers import TemplateBuilder

tb = TemplateBuilder()
s = tb.add_cover_slide()
tb.text(s, 0.8, 1.5, 8.4, 0.6, '標題', sz=32, color=tb.RED2, bold=True)

s = tb.add_content_slide('頁面標題')
tb.three_col_icon_cards(s, [
    {'icon_text': '', 'title': '功能一', 'body': '說明'},
    {'icon_text': '', 'title': '功能二', 'body': '說明'},
    {'icon_text': '', 'title': '功能三', 'body': '說明'},
])

# 放置白色向量圖示到紅色圓圈上(自動檢測圓圈位置)
def find_circles(slide):
    circles = []
    for shape in slide.shapes:
        if 'Oval' in shape.name:
            x, y = shape.left / 914400, shape.top / 914400
            w, h = shape.width / 914400, shape.height / 914400
            circles.append({'cx': x + w/2, 'cy': y + h/2, 'w': w})
    return circles

for circle, query in zip(find_circles(s), ['server', 'wifi', 'database']):
    sz = circle['w'] * 0.55
    tb.place_icon(s, query, circle['cx'] - sz/2, circle['cy'] - sz/2, size=sz, color='FFFFFF')

tb.save('output.pptx')

設計系統

色板

名稱 色值 用途
RED #C00000 頁標題、強調
RED2 #EA0000 封面標題
RED3 #D8222A 小節標題
DARK #343434 正文
MID #4B4948 次要文字
LIGHT #A0A0A0 輔助/淡化
BG #F1F1F1 卡片背景
BORDER #E7E7E7 邊框/分隔線
ACCENT_GREY #6B6B6B 交替強調(替代藍色)

配色法則

  • 60% 白色(背景) / 30% 灰黑(正文) / 10% 紅色(強調)
  • 顏色只從色板裡選,不引入新顏色

字型規範

本技能來自小蔥技能站7w4.net。

  • 字型:微軟雅黑(latin + ea 同時設定)
  • 頁標題:20pt 粗體 RED
  • 小節標題:12-14pt 粗體 RED/RED3
  • 正文:10-11pt DARK/MID
  • 最小字號:10pt(確保投屏可讀)

畫布規則

  • 畫布:10" × 5.625"(16:9)
  • 安全邊距:≥ 0.4"
  • 內容區起點:y = 1.0"(標題下方)
  • 所有 body 文本啟用 shrink=True(自動縮字防溢位)
  • 多欄佈局自動水平居中:start_x = (10 - total_width) / 2

24種內容佈局

兩欄/兩行(5種)

# 方法 適用場景
1 two_col_numbered_cards A/B對比
2 two_row_numbered_bars 兩要點堆疊
3 two_row_label_tabs 分類標籤+詳情
4 two_col_circle_cards 人物/角色
5 left_text_right_stacked_cards 論點+論據(支援2-3張卡片自適應)

三欄/三行(5種)

# 方法 適用場景
6 three_col_vertical_cards 三個並列特性
7 three_row_numbered_bars 三步編號
8 three_row_label_bars 三分類標籤
9 three_col_icon_cards 圖示+標題+說明
10 three_col_numbered_card_blocks 編號灰卡半嵌入

四欄/四行(6種)

# 方法 適用場景
11 four_col_tall_cards 四個高卡片(標題高度自適應)
12 four_row_badge_bars 四行徽章條
13 four_col_ascending_steps 四步階梯遞進
14 four_col_red_base_cards 紅底白卡+圓環
15 four_col_numbered_dividers 豎分隔線四欄
16 four_col_parallelogram 傾斜平行四邊形

時間軸/流程(5種)

# 方法 適用場景
17 timeline_horizontal_ascending 水平時間軸+箭頭
18 timeline_icon_flow 圓形圖示流程(紅/灰交替)
19 timeline_zigzag 上下交替時間線(3-5步)
20 process_flow_arrows 流程箭頭
21 process_three_stage 三階段里程碑

特殊佈局(3種)

# 方法 適用場景
22 triple_overlap_circles 三圓交疊(倒三角)
23 diamond_quadrants 菱形四象限
24 four_panel_on_platform 橢圓基座四面板

向量圖示系統

279個簡潔向量圖示,支援搜尋、複製和變色。

圖示呼叫

# 搜尋並放置(自動變白色)
tb.place_icon(slide, 'server', x=2.0, y=1.5, size=0.5, color='FFFFFF')

# 搜尋關鍵詞(中英文均可)
results = tb.icons.search('資料庫', limit=3)

圖示使用原則

  • 紅色/灰色圓圈上放白色圖示(color='FFFFFF'
  • 圖標占圓圈直徑的 55% 最佳
  • 使用 find_circles() 自動檢測圓圈位置,確保居中
  • 每頁最多4個圖示
  • 大小 0.4-0.8"

分類

分類 數量
電腦 50
硬體 36
網路 32
伺服器 25
資料庫 20
裝置 12
組合 63

製作流程

需求理解 → 大綱(等確認) → 生成 → QA審校(修到0) → 評分 → 傳送 → 迭代

關鍵規則

  1. 先出大綱,等使用者確認再生成
  2. 相鄰頁佈局不能重複,同一佈局全篇最多2次
  3. 每頁 60-220 字,填充率 40-75%
  4. 紅色只用於標題和重點強調,交替配色用紅/灰
  5. 所有 body 文本必須有 shrink=True
  6. 多行標題自動調整高度,避免文字與裝飾線重疊
  7. 修改模板前必須先備份原檔案
  8. 所有反饋記錄到 memory/ppt-feedback.md

v1.1.0 更新內容

  • 新增佈局: timeline_zigzag(上下交替時間線)
  • 圖示系統重建: 279個簡潔向量圖示,支援搜尋/複製/變色(copy_icon color引數)
  • 圖示居中機制: bounding box 居中演算法,配合 find_circles 自動檢測
  • 邊距對稱修復: 多欄佈局自動水平居中
  • 標題高度自適應: 多行標題自動擴大,下方元素跟隨下移
  • 字型統一: text()/multi_text() 同時設定 latin + ea 為微軟雅黑
  • 最小字號: 全域性 10pt(從 8pt/9pt 升級)

📁 包含檔案 (8 個)

📄 SKILL.md 6.9 KB
📄 _meta.json 138 B
📄 assets/icon-index.json 84.6 KB
📄 references/page-types.md 14.1 KB
📄 scripts/icon_library.py 5.2 KB
📄 scripts/ppt_helpers.py 64.6 KB
📄 scripts/ppt_qa.py 17.2 KB
📄 scripts/ppt_scorer.py 22.1 KB