---
name: ourdigital-document
description: |
  Notion-to-presentation workflow for OurDigital.
  Activated with "ourdigital" keyword.

  Triggers:
  - "ourdigital document", "ourdigital 문서"
  - "ourdigital presentation", "ourdigital 프레젠테이션"

  Features:
  - Script-based automation
  - Notion extraction
  - PowerPoint generation
  - Brand application
version: "1.1"
author: OurDigital
environment: Code
---

# OurDigital Document (Code)

Automated Notion-to-presentation pipeline with script execution.

## Activation

Only with "ourdigital" keyword:
- "ourdigital document [Notion URL]"
- "ourdigital 발표자료"

## Quick Start

```bash
# Full automated workflow
python shared/scripts/run_workflow.py --notion-url [URL] --output presentation.pptx

# Step-by-step
python code/scripts/extract_notion.py [URL] > research.json
python code/scripts/synthesize_content.py research.json > synthesis.json
python code/scripts/apply_brand.py synthesis.json --output presentation.pptx
```

## Workflow Pipeline

```
extract_notion.py → synthesize_content.py → apply_brand.py
     ↓                    ↓                      ↓
 research.json       synthesis.json         presentation.pptx
```

## Scripts

| Script | Purpose |
|--------|---------|
| `run_workflow.py` | Orchestrate full pipeline |
| `extract_notion.py` | Extract content from Notion |
| `synthesize_content.py` | Analyze and structure |
| `apply_brand.py` | Apply corporate styling |
| `generate_pptx.js` | Generate PowerPoint |

## Extract Notion

```bash
# Single page
python code/scripts/extract_notion.py notion://page/abc123 > research.json

# Database query
python code/scripts/extract_notion.py notion://database/def456 --filter "Status=Done"
```

## Synthesize Content

```bash
# Generate slide structure
python code/scripts/synthesize_content.py research.json > synthesis.json

# With presentation type
python code/scripts/synthesize_content.py research.json \
  --type executive \
  --max-slides 10
```

## Apply Brand

```bash
# PowerPoint output
python code/scripts/apply_brand.py synthesis.json \
  --config code/assets/brand_config.json \
  --output presentation.pptx

# Preview HTML
python code/scripts/apply_brand.py synthesis.json --preview
```

## Output Formats

- PowerPoint (.pptx)
- Figma (via API)
- HTML preview

## Brand Configuration

See `code/assets/brand_config.json` for:
- Logo placement
- Color scheme (OurDigital palette)
- Font settings (Noto Sans KR/Inter)
- Slide templates

## Quick Commands

| Command | Action |
|---------|--------|
| "ourdigital document [URL]" | Full pipeline |
| "ourdigital document → pptx" | PowerPoint output |
| "ourdigital document → figma" | Figma export |

## File Structure

```
05-ourdigital-document/
├── code/
│   ├── SKILL.md
│   ├── scripts/
│   │   ├── run_workflow.py
│   │   ├── extract_notion.py
│   │   ├── synthesize_content.py
│   │   └── apply_brand.py
│   └── assets/
│       └── brand_config.json
├── desktop/SKILL.md
├── shared/references/
└── docs/CHANGELOG.md
```
