md-to-pptx について
md-to-pptxは、MarkdownをPowerPointに変換したり、AI支援で内容を作成したりするスキル兼Pythonツールです。組み込み・カスタムテンプレート、コマンドラインオプション、Python APIを備えています。
主な機能
- 01Markdownの見出しをスライドに変換
- 024種類の組み込みテーマ
- 03カスタムPowerPointテンプレートに対応
- 04生成の進捗と警告を表示
- 05コマンドラインとPythonのインターフェース
活用シーン
- 01既存のMarkdown文書をスライドに変換
- 02生成した内容からテーマ付き資料を作成
- 03カスタムテンプレートでプレゼンテーションを保存
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ echoleesong/ claude-skills-plugin --skill md-to-pptxインストール後、Claude Code で/md-to-pptxを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
assets/templates/business_template.pptxeducation_template.pptxtech_dark_template.pptx蓝黄色新拟态行业调研报告PPT模板.pptxreferences/markdown-format.mdscripts/generate_templates.pymd_parser.pymd_to_pptx.pypptx_generator.py詳細
md-to-pptx
Markdown を PowerPoint に変換したり、AI の支援を受けてプレゼンテーションを作成したりできます。
依存関係
使用する前に、必要なパッケージをインストールしてください。
pip install python-pptx Pillow
注:Python 3 がデフォルトではないシステムでは、python の代わりに python3 を使用してください。
ワークフロー
ステップ 1:要件の確認
重要:コンテンツを生成する前に、AskUserQuestion ツールを使用して、必ず次の質問をユーザーにしてください。
-
スライド枚数:PPT のスライドは何枚にしますか?
- 選択肢:5~10 枚、10~15 枚、15~20 枚、20 枚以上
-
対象ユーザー:この PPT の対象者は誰ですか?
- 選択肢:企業の経営幹部/意思決定者、技術チーム/開発者、学生/教育関係者、一般の方/顧客
-
プレゼンテーションの用途:この PPT はどのような場面で使用しますか?
- 選択肢:ビジネス報告/会議、製品発表/ロードショー、トレーニング/授業、学術発表/研究共有
-
PPT テンプレートの選択:既存の PPT テンプレートを使用しますか?
- 選択肢:
- business(ビジネススタイル - 白い背景、濃い青のタイトル)
- tech_dark(テクノロジースタイル - 暗い背景、緑のアクセント)
- education(教育スタイル - 暖色の背景、オレンジのアクセント)
- neumorphism(ニューモーフィズムスタイル - 青と黄色のモダンなデザイン)
- テンプレートを使用しない/カスタム
- 選択肢:
追加で尋ねる質問:
- ソース:既存の Markdown ファイルがありますか?それとも、コンテンツを生成しますか?
- 保存先:PPT の保存先はどこにしますか?(デフォルト:ユーザーの現在の作業ディレクトリ)
回答を参考にして、コンテンツの生成方針を決めます。
- スライド枚数:コンテンツの詳しさや詳細度を決めます
- 対象ユーザー:言葉の難易度、用語、例に影響します
- プレゼンテーションの用途:トーン、構成、ビジュアルスタイルに影響します
- テンプレート:プレゼンテーションのビジュアルテーマを設定します
ステップ 2:アプローチの決定
既存の Markdown を変換する場合:
- Markdown ファイルを読み込みます
- コンテンツをスライドに分割します(H1/H2 見出しごとに新しいスライドを作成します)
- 適切なレイアウトで PPTX を生成します
新しいコンテンツを生成する場合:
- ユーザーのトピックに基づいてアウトラインを作成します
- アウトラインを提示し、ユーザーの承認を得ます
- Markdown のコンテンツ全体を生成します
- PPTX に変換します
ステップ 3:プレゼンテーションの生成
変換スクリプトを実行します。
python scripts/md_to_pptx.py input.md -o output.pptx --theme business
コマンドラインオプション
python scripts/md_to_pptx.py <input.md> [options]
Options:
-o, --output Output filename (default: input name + .pptx)
-d, --directory Output directory (default: user's current directory)
-t, --theme Theme: business, tech_dark, education, neumorphism
--template Path to custom .pptx template
--no-template Generate without using built-in template
-q, --quiet Suppress progress output
--list-themes Show available themes
--list-templates Show template locations
使用例
# Save to current directory (default)
python scripts/md_to_pptx.py presentation.md
# Specify output filename
python scripts/md_to_pptx.py presentation.md -o slides.pptx
# Save to Desktop
python scripts/md_to_pptx.py presentation.md -d ~/Desktop
# Use tech dark theme
python scripts/md_to_pptx.py presentation.md --theme tech_dark
# Use neumorphism theme
python scripts/md_to_pptx.py presentation.md --theme neumorphism
# Use custom template
python scripts/md_to_pptx.py presentation.md --template company.pptx
# Show available themes
python scripts/md_to_pptx.py --list-themes
# Show template locations
python scripts/md_to_pptx.py --list-templates
組み込みテンプレート
assets/templates/ には、4 つの組み込みテンプレートが含まれています。
| テンプレート | ファイル | 説明 |
|---|---|---|
| business | business_template.pptx | 白い背景、濃い青のタイトル、プロフェッショナルなデザイン |
| tech_dark | tech_dark_template.pptx | 濃いグレーの背景、緑のアクセント、開発者向け |
| education | education_template.pptx | 暖かみのあるクリーム色の背景、オレンジのアクセント、親しみやすいデザイン |
| neumorphism | 蓝黄色新拟态行业调研报告PPT模板.pptx | 青と黄色のニューモーフィズムスタイル、モダンな調査レポート |
カスタムテンプレート
カスタムの .pptx テンプレートを assets/templates/ に配置するか、--template でパスを指定してください。
# Use template from assets/templates/
python scripts/md_to_pptx.py input.md --template assets/templates/my_company.pptx
# Use template from any location
python scripts/md_to_pptx.py input.md --template /path/to/custom.pptx
組み込みテンプレートを再生成するには:
python scripts/generate_templates.py -o assets/templates
Markdown 形式
主なルール:# H1 はタイトルスライド、## H2 はコンテンツスライドを作成し、### H3+ は現在のスライドに配置されます。
サポートされる要素、画像の処理、レイアウトの選択など、形式の詳細については、references/markdown-format.md を参照してください。
エラー処理
ジェネレーターはフォールトトレラントモードを使用します。
- サポートされていない要素は警告とともにスキップされます
- 画像が見つからない場合は、プレースホルダーテキストが表示されます
- 形式が正しくない表はテキストに置き換えられます
- すべての警告は収集され、最後に報告されます
進捗状況の表示
スクリプトはスライドごとに進捗状況を報告します。
📄 Reading: presentation.md
📊 Parsed 6 slides
📋 Using built-in template: tech_dark_template.pptx
[████████░░░░░░░░░░░░░░░░░░░░░░] 3/6 - Generating slide 3: Introduction...
✅ Created: /path/to/output.pptx
Python API
from scripts.md_to_pptx import convert_md_to_pptx, generate_from_content
# Convert file
success, output_path, warnings = convert_md_to_pptx(
"presentation.md",
output_path="slides.pptx",
theme="business"
)
# Generate from content string
success, warnings = generate_from_content(
"# My Title\n\n## Slide 1\nContent here",
"output.pptx",
theme="tech_dark"
)
一般的な対話の流れ
- ユーザー:「X についてのプレゼンテーションを作成してください」
- 質問:希望するテーマはありますか?保存先はどこにしますか?
- アウトラインを生成し、承認を得るために提示します
- ユーザーが承認するか、変更を依頼します
- Markdown コンテンツ全体を生成します
- 選択したオプションを指定して変換スクリプトを実行します
- 報告:X 枚のスライドを作成し、Y に保存しました。警告があればその内容も報告します