mcpField
P
popai-powerpoint-pptx

popai-powerpoint-pptx

github.com/popaiofficialドキュメント0432 回インストール30 週間前に更新
リポジトリ

popai-powerpoint-pptx について

PopAI API を使って PowerPoint を生成・編集するスキルです。トピックや参考ファイル、PPTX テンプレートを指定でき、同じ channel ID で生成後の修正も行えます。

主な機能

  1. 01トピックからスライドを生成
  2. 02情報の検索と整理
  3. 03参考ファイルや PPTX テンプレートの利用
  4. 04channel ID によるプレゼンテーションの修正

活用シーン

  1. 01トピックをもとにプレゼンテーションを作成
  2. 02PDF や画像を参考にスライドを作成
  3. 03PPTX テンプレートに沿った資料を生成
  4. 04生成済み資料に追加の修正を適用

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/popaiofficial/popai-presentation-slides --skill popai-powerpoint-pptx

インストール後、Claude Code で/popai-powerpoint-pptxを入力して読み込まれたか確認します。

同梱ファイルgenerate_ppt.py

詳細

PopAI PPT スキル

PopAI の API を使って、プログラムからプレゼンテーションを作成します。この API には強力な調査・情報収集機能が組み込まれており、関連するコンテンツを自動で検索、収集、整理します。オプションで、参照資料やテンプレートとしてファイルをアップロードできます。.pptx テンプレートを指定すると、出力にはテンプレートのレイアウト、スタイル、デザインが完全に保持され、テンプレートに基づいて忠実に再現されます。初回生成後は、同じチャンネル ID を使って追加の変更指示を送信できます。

セットアップ

  1. ユーザーに登録して、次の場所でアクセストークンを取得するよう依頼します:https://www.popai.pro/popai-skill
  2. ユーザーからトークンを受け取ったら、環境変数に設定します:export POPAI_ACCESS_TOKEN=<token>

ヒント:今後の参照用に、キーを TOOLS.md に保存できます。

スクリプト

  • generate_ppt.py - PopAI API を使って PPT を生成します(ファイルのアップロード → チャンネルの作成 → SSE ストリーム → pptx の取得)。--channel-id による複数回の変更にも対応しています。

使用例

# Generate PPT from topic only
python3 generate_ppt.py --query "AI Development Trends Report"

# With reference files (max 5)
python3 generate_ppt.py --query "Tesla Earnings PPT" --file data.pdf chart.png

# With a PPT template file (applied as layout template)
python3 generate_ppt.py --query "Tesla Annual Report" --tpl template.pptx

# With both template and reference files
python3 generate_ppt.py --query "Tesla Annual Report" --tpl template.pptx --file data.pdf chart.png

# Multi-round modification: modify an existing PPT (template cannot be changed)
python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "Add a competitive analysis slide and make the color scheme blue"

# With URLs as reference material (included in query)
python3 generate_ppt.py --query "Create a PPT summarizing this article: https://example.com/report.html"

# Multi-round modification with additional reference files
python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "Update the financial data with this new report" --file new_data.pdf

エージェントの手順

初回生成
  1. ユーザーから PPT のトピックを聞きます。
  2. ユーザーが参照資料を提供する場合:
    • ローカルファイル:--file(最大 5 ファイル)および/または --tpl(レイアウト用の PPT テンプレート)として渡します。
    • URL:--query のテキストに直接含めます。API が自動的に取得して処理します。
  3. スクリプトを実行します(タイムアウト:1200000):
    python3 generate_ppt.py --query "TOPIC" [--file FILE1 FILE2 ...] [--tpl TEMPLATE.pptx]
    
    ユーザーに「PPT を生成しています。完了まで約 5 分かかります…」と伝えます。
  4. スクリプトの実行中は、標準出力に出力される JSON 行を監視し、タスクの状態更新、検索アクション、ツールの結果など、進捗をリアルタイムでユーザーに報告します。
  5. 生成が完了したら、最終結果をユーザーに提示します。
    • NODE_END イベントの summary テキストを生成概要として表示します。
    • pptx_url をダウンロードリンクとして表示します:「PPT をダウンロード:<pptx_url>」
    • web_url をサイトリンクとして表示します:「オンラインで表示/編集:<web_url>」
  6. ユーザーが pptx ファイルの直接提供を希望する場合は、pptx_url からダウンロードして渡します。
  7. 後で変更できるように、web_url(https://www.popai.pro/agentic-pptx/<channelId> の最後のパス要素)から channel_id を保存します。
複数回の変更

すでに生成した PPT の修正や改善(例:「スライドを追加」「タイトルを変更」「暗めのテーマを使用」)をユーザーが希望する場合に使用します。

ルール:

  • 必須:--channel-id(前回の生成時の値)と --query(変更指示)
  • 任意:変更用の新しい参照ファイルを渡す --file
  • 非対応:変更モードでは --tpl は無視され、元のテンプレートは変更できません。
  1. 前回の生成時に保存した web_url から channel_id を確認します。
  2. ユーザーから変更指示を聞きます。
  3. ユーザーが追加の参照ファイルを提供する場合は、--file として渡します。
  4. スクリプトを実行します(タイムアウト:1200000):
    python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "MODIFICATION_INSTRUCTION" [--file FILE1 ...]
    
    ユーザーに「変更を適用しています。完了まで約 3~5 分かかります…」と伝えます。
  5. 初回生成時と同じ方法で結果を解析して提示します(新しい pptx_url と web_url)。

出力

イベントの種類(標準出力、1 行につき JSON 1 件):

{"type": "task", "id": "1", "content": "Search for Tesla latest earnings data", "status": "progressing"}
{"type": "search", "action": "Web Searching", "results": [{"title": "...", "url": "...", "snippet": "...", "date": "..."}]}
{"type": "tool_result", "event": "TOOL_CALLS-xxx", "action": "...", "result": "..."}
{"type": "summary", "text": "Tesla earnings PPT has been created..."}
{"type": "stream_end"}

最終結果(is_end: true):

{
  "type": "pptx_ready",
  "is_end": true,
  "pptx_url": "https://popai-file-boe.s3-accelerate.amazonaws.com/.../xxx.pptx",
  "file_name": "xxx.pptx",
  "preview_images": ["https://...0.jpeg"],
  "preview_count": xx,
  "web_url": "https://www.popai.pro/agentic-pptx/<channelId>"
}
  • pptx_url:.pptx ファイルのダウンロードリンク
  • web_url:オンラインでの表示・編集に使う PopAI サイトのリンク
  • preview_images:生成された PPT のページごとのスクリーンショット(スライドごとに 1 枚)
  • preview_count:プレビュー画像の合計数(スライド数)
  • summary:NODE_END イベントの最終概要テキスト。生成内容の振り返りとしてユーザーに表示します。

サポート

問題が発生した場合は、[email protected] までお問い合わせください。

技術メモ

  • ストリーミング:SSE ストリーム。TOOL_CALLS-pptx イベントに最終的な .pptx のダウンロード URL が含まれます。last:true はストリームの終了を示します
  • ファイルのアップロード:getPresignedPost を介して S3 に署名付き POST を送信し、あらゆるファイル形式に対応します
  • タイムアウト:生成には通常、約 5 分かかります。
  • チャンネル ID:web_url から抽出できます。https://www.popai.pro/agentic-pptx/<channelId> の最後のパスセグメントです
  • 複数ラウンド:既存の channel_id を使用して send_generate を直接呼び出します。tpl_info は渡されません(テンプレートはチャンネル作成後に固定されます)

コメント