Skip to content

Latest commit

 

History

History
524 lines (391 loc) · 13.3 KB

File metadata and controls

524 lines (391 loc) · 13.3 KB

AI-Assisted Graphical Presentation Generator

English | 日本語

A Python-based presentation generation framework that works with AI_Instruction_Kits to enable AI-assisted creation of professional, graphical presentations for technical and business content.

📚 Documentation

📊 Sample Scenarios

Various use case samples are available:

  • Diagram Showcase - All diagram types (Japanese)

    • 3-layer architecture diagrams
    • Flowcharts (multiple patterns)
    • Comparison tables
  • Technical Presentation - CI/CD Pipeline Implementation Guide (Japanese)

    • Technical architecture
    • Detailed flowcharts
    • Best practices
  • Business Presentation - DX Project Proposal (Japanese)

    • Organization charts
    • Process flows
    • Investment plans & metrics
# Build samples
make build-scenario SCENARIO=scripts/scenarios/diagram_showcase.md
make build-scenario SCENARIO=scripts/scenarios/technical_sample.md
make build-scenario SCENARIO=scripts/scenarios/business_sample.md

Features

  • Modern Design: Minimalist and professional monochrome-centered style
  • Widescreen Format: 16:9 widescreen support
  • Markdown Scenarios: Generate presentations just by writing Markdown
  • AI-Assisted Conversation Mode: Create presentations through natural language dialogue
  • Multiple Diagram Types: Architecture diagrams, flowcharts, network diagrams using diagrams, graphviz, and networkx
  • Statistical Charts: Line charts, bar charts, scatter plots, pie charts using matplotlib and seaborn
  • Bilingual Support: Japanese and English presentations with proper font handling
  • Theme System: Monochrome (default), Corporate, Technical, Academic themes
  • PowerPoint Generation: Professional .pptx files with python-pptx

Installation

Prerequisites

  • Python 3.8 or higher
  • Graphviz (for flowcharts)
  • uv - Fast Python package installer (recommended)

Install uv (Recommended)

Linux/macOS:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows:

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Alternative (with pip):

pip install uv

Install Graphviz

Ubuntu/Debian:

sudo apt-get install graphviz

macOS:

brew install graphviz

Windows: Download from https://graphviz.org/download/

Install Package

Quick Setup (Recommended)

One-liner automatic setup:

bash scripts/setup.sh

This script automatically:

  • Detects uv or pip
  • Creates virtual environment
  • Installs dependencies
  • Verifies installation

Manual Setup

Option 1: Using uv (Recommended - Fast)
# Clone repository
git clone https://github.com/dobachi/PresentationTemplate.git
cd PresentationTemplate

# Initialize AI_Instruction_Kits submodule
git submodule update --init --recursive

# Create virtual environment
uv venv
source .venv/bin/activate  # On Linux/macOS
# .venv\Scripts\activate    # On Windows

# Install dependencies (auto-loaded from pyproject.toml)
uv pip install -e .
Option 2: Using Traditional venv + pip
# Clone repository
git clone https://github.com/dobachi/PresentationTemplate.git
cd PresentationTemplate

# Initialize AI_Instruction_Kits submodule
git submodule update --init --recursive

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
source venv/bin/activate  # On Linux/macOS
# venv\Scripts\activate    # On Windows

# Install dependencies (auto-loaded from pyproject.toml)
pip install -e .

Quick Start

Method 0: Using Make (Easiest)

# Initial setup
make setup

# Build presentation from Markdown scenario (NEW!)
make build-scenario SCENARIO=scripts/scenarios/example.md

# List available scenario files
make list-scenarios

# Build presentation from Python script
make build SCRIPT=scripts/generate_presentation.py

# Generate examples
make examples

# See all available commands
make help

Method 1: AI-Assisted Mode (Recommended)

Talk to Claude directly using the CLAUDE.md instruction file:

I want to create a 15-minute presentation about Data Space International
Interoperability, focusing on Japan-Europe collaboration (Ouranos and Gaia-X).
Target audience is technical. Language: English.

Claude will:

  1. Ask clarifying questions
  2. Propose slide structure
  3. Generate diagrams automatically
  4. Create the PowerPoint file

Method 2: Python API

from src.core.presentation import PresentationBuilder
from src.diagrams.architecture import ArchitectureDiagram
from src.charts.statistical import StatisticalChart

# Create builder
builder = PresentationBuilder(theme='corporate', language='en')

# Add title slide
builder.add_title_slide(
    title="Data Space International Interoperability",
    subtitle="Japan-Europe Collaboration"
)

# Generate and add architecture diagram
arch_diagram = ArchitectureDiagram(language='en')
diagram_path = arch_diagram.create_three_layer_architecture(
    layers={
        'application': ['App 1', 'App 2', 'App 3'],
        'service': ['API Gateway', 'Auth Service', 'Data Catalog'],
        'data': ['Metadata DB', 'Data Storage', 'Object Store']
    }
)
builder.add_diagram_slide(
    title="Data Space 3-Layer Architecture",
    diagram_path=diagram_path
)

# Generate and add chart
chart = StatisticalChart(language='en')
chart_path = chart.create_line_chart(
    data={
        'x': [2020, 2021, 2022, 2023, 2024],
        'y_ouranos': [10, 25, 45, 80, 120],
        'y_gaiax': [30, 60, 95, 140, 200]
    },
    labels={
        'x_axis': 'Year',
        'y_axis': 'Adoption Rate',
        'y_ouranos': 'Ouranos',
        'y_gaiax': 'Gaia-X'
    },
    title='Data Space Adoption Trend'
)
builder.add_chart_slide(
    title="Adoption Trends",
    chart_path=chart_path
)

# Save presentation
builder.save('output/DataSpace_Interoperability.pptx')

Method 3: Markdown Scenario (NEW!)

Most flexible and easy-to-edit method

Write presentation content in Markdown files and automatically generate PowerPoint. Makes content editing simple and version control easy.

Create Markdown Scenario (scripts/scenarios/my_presentation.md):

---
title: Data Space International Interoperability
author: Dobachi
theme: corporate
language: en
---

# Data Space International Interoperability
## Japan-Europe Collaboration: Current Status and Future

---

## Background and Purpose

International efforts toward data-driven society are accelerating.

- Expansion of data economy
- Need for cross-border data flows
- Building trusted data sharing infrastructure

::: notes
Spend about 2 minutes explaining the background in this slide.
:::

---

## Data Space 3-Layer Architecture

```diagram:three_layer
application:
  - Web Application
  - Mobile App
service:
  - API Gateway
  - Authentication Service
data:
  - Metadata DB
  - Distributed Data Storage

::: notes The 3-layer structure balances security and scalability. :::


Future Outlook

  • Development of common standards
  • Promotion of pilot projects
  • Building global ecosystems

**Generate Presentation**:

```bash
# Command line
.venv/bin/python scripts/build_from_scenario.py scripts/scenarios/my_presentation.md

# Or using Make
make build-scenario SCENARIO=scripts/scenarios/my_presentation.md

Markdown Scenario Syntax:

  • YAML Frontmatter: Presentation metadata (title, theme, language)
  • # Heading 1: Title slide
  • ## Heading 2: Content slide
  • ---: Slide separator
  • - Bullet: Bullet list
  • ::: notes ... :::: Speaker notes
  • ```diagram:type ... ```: Diagram generation
    • three_layer: 3-layer architecture
    • flowchart: Flowchart
    • network: Network diagram
  • ```chart:type ... ```: Chart generation
    • line: Line chart
    • bar: Bar chart

Benefits of Markdown Scenarios:

Easy to edit: Direct editing in text editor ✅ Version control: Easy diff management with Git ✅ Focus on content: Concentrate on content rather than appearance ✅ Reusability: Create multiple presentations with same structure ✅ AI assistance: Easy for Claude to propose and modify content

Method 4: YAML Definition

Create a YAML file:

presentation:
  title: "Data Space Architecture"
  author: "Dobachi"
  language: "en"
  theme: "corporate"

slides:
  - type: title
    title: "Data Space Architecture"
    subtitle: "Overview and Components"

  - type: content
    title: "Introduction"
    layout: "text"
    bullets:
      - "What is Data Space"
      - "Why it matters"
      - "Key components"

Generate:

builder = PresentationBuilder()
builder.load_definition('my_presentation.yaml')
builder.build_from_definition(builder.load_definition('my_presentation.yaml'))
builder.save('output.pptx')

Supported Diagram Types

Architecture Diagrams

  • 3-layer architecture (Data/Service/Application)
  • Cloud architecture (AWS, Azure, GCP)
  • Microservices architecture
  • International interoperability (Ouranos ↔ Gaia-X)

Flowcharts

  • Process flows
  • Decision trees
  • Data flow diagrams

Network Diagrams

  • Network topology
  • Interoperability networks
  • Connectivity diagrams

Statistical Charts

  • Line charts
  • Bar charts (vertical/horizontal)
  • Scatter plots
  • Pie charts
  • Stacked bar charts

Bilingual Support

Japanese Presentation

builder = PresentationBuilder(theme='corporate', language='ja')
builder.set_fonts(
    title_font='Meiryo',
    body_font='Meiryo'
)

English Presentation

builder = PresentationBuilder(theme='corporate', language='en')
builder.set_fonts(
    title_font='Arial',
    body_font='Arial'
)

Mixed Japanese-English

builder = PresentationBuilder(theme='corporate', language='ja_en')
builder.add_title_slide(
    title="Data Space Architecture",
    subtitle="データスペースアーキテクチャ"
)

Themes

Three built-in themes:

  • Corporate: Professional blue theme
  • Technical: Technical with dark accents
  • Academic: Academic style

Custom themes can be created in config/themes/.

Examples

See the examples/ directory for:

  • architecture_example.py - Architecture diagram examples
  • full_presentation_example.py - Complete presentation example
  • example_conversation.md - Sample AI conversation

AI Instruction Files

The project includes specialized AI instruction modules in instructions/modules/:

  • presentation_designer.md - Conversation guide for design
  • diagram_generator.md - Diagram creation instructions
  • presentation_workflow.md - End-to-end workflow

These work with the AI_Instruction_Kits framework.

Project Structure

PresentationTemplate/
├── src/                      # Library code (DO NOT modify)
│   ├── core/                 # Core presentation building
│   ├── diagrams/             # Diagram generation library
│   ├── charts/               # Chart generation library
│   ├── i18n/                 # Internationalization & fonts
│   ├── ai/                   # AI conversation flow
│   └── utils/                # Utilities
├── scripts/                  # User scripts (CREATE HERE)
│   ├── setup.sh              # Setup script
│   ├── check_dependencies.py # Dependency checker
│   └── generate_*.py         # Presentation generation scripts
├── config/
│   └── themes/               # Theme configurations
├── instructions/
│   ├── ai_instruction_kits/  # Submodule
│   └── modules/              # Custom instruction modules
├── examples/                 # Sample code (for reference)
│   ├── architecture_example.py
│   └── full_presentation_example.py
├── output/                   # Generated presentations
└── templates/                # PowerPoint templates

Directory Roles

  • src/: Library code provided by this template. DO NOT modify
  • scripts/: User-created scripts for presentation generation. CREATE HERE
  • examples/: Sample code demonstrating usage
  • output/: Location where generated .pptx files are saved

Troubleshooting

If you encounter issues, see the Troubleshooting Guide.

Common issues:

  • Graphviz errors: Ensure Graphviz is installed on your system
  • Japanese font issues: Meiryo or fallback fonts must be installed
  • Dependency errors: Reinstall with uv pip install -e .

License

MIT License

Contributing

Contributions welcome! Please see CONTRIBUTING.md for guidelines.

Author

Dobachi

Acknowledgments