mirror of
https://github.com/K-Dense-AI/scientific-agent-skills.git
synced 2026-12-06 19:44:01 +08:00
- Enhanced AGENTS.md to clarify skill scope and directory structure, providing clearer guidelines for skill creation and updates. - Updated CONTRIBUTING.md to emphasize the separation of tests from skill directories, ensuring better organization and clarity for contributors. - Revised .gitignore to include .pytest_cache, improving project cleanliness. - Adjusted pyproject.toml to configure pytest for better test path management. - Incremented version number in SKILL.md for autoskill to reflect recent updates.
144 lines
4.3 KiB
Markdown
144 lines
4.3 KiB
Markdown
# Bundled Script Reference
|
|
|
|
Arguments, options, and usage for `generate_slide_image.py`, `slides_to_pdf.py`,
|
|
`validate_presentation.py`, and `pdf_to_images.py`, plus the pptx-skill scripts and
|
|
external tools this skill relies on.
|
|
|
|
## Nano Banana Pro Script Reference
|
|
|
|
### generate_slide_image.py
|
|
|
|
Generate presentation slides or visuals using Nano Banana Pro AI.
|
|
|
|
```bash
|
|
# Full slide (default) - generates complete slide as image
|
|
python scripts/generate_slide_image.py "slide description" -o output.png
|
|
|
|
# Visual only - generates just the image/figure for embedding in PPT
|
|
python scripts/generate_slide_image.py "visual description" -o output.png --visual-only
|
|
|
|
# With reference images attached (Nano Banana Pro will see these)
|
|
python scripts/generate_slide_image.py "Create a slide explaining this chart" -o slide.png --attach chart.png
|
|
python scripts/generate_slide_image.py "Combine these into a comparison slide" -o compare.png --attach before.png --attach after.png
|
|
```
|
|
|
|
**Options:**
|
|
- `-o, --output`: Output file path (required)
|
|
- `--attach IMAGE`: Attach image file(s) as context for generation (can use multiple times)
|
|
- `--visual-only`: Generate just the visual/figure, not a complete slide
|
|
- `--iterations`: Max refinement iterations (default: 2)
|
|
- `--api-key`: OpenRouter API key (or set OPENROUTER_API_KEY env var)
|
|
- `-v, --verbose`: Verbose output
|
|
|
|
**Attaching Reference Images:**
|
|
|
|
Use `--attach` when you want Nano Banana Pro to see existing images as context:
|
|
- "Create a slide about this data" + attach the data chart
|
|
- "Make a title slide with this logo" + attach the logo
|
|
- "Combine these figures into one slide" + attach multiple images
|
|
- "Explain this diagram in a slide" + attach the diagram
|
|
|
|
**Environment Setup:**
|
|
```bash
|
|
export OPENROUTER_API_KEY='your_api_key_here'
|
|
# Get key at: https://openrouter.ai/keys
|
|
```
|
|
|
|
### slides_to_pdf.py
|
|
|
|
Combine multiple slide images into a single PDF.
|
|
|
|
```bash
|
|
# Combine PNG files
|
|
python scripts/slides_to_pdf.py slides/*.png -o presentation.pdf
|
|
|
|
# Combine specific files in order
|
|
python scripts/slides_to_pdf.py title.png intro.png methods.png -o talk.pdf
|
|
|
|
# From directory (sorted by filename)
|
|
python scripts/slides_to_pdf.py slides/ -o presentation.pdf
|
|
```
|
|
|
|
**Options:**
|
|
- `-o, --output`: Output PDF path (required)
|
|
- `--dpi`: PDF resolution (default: 150)
|
|
- `-v, --verbose`: Verbose output
|
|
|
|
**Tip:** Name slides with numbers for correct ordering: `01_title.png`, `02_intro.png`, etc.
|
|
|
|
---
|
|
|
|
## Tools and Scripts
|
|
|
|
### Nano Banana Pro Scripts
|
|
|
|
**generate_slide_image.py** - Generate slides or visuals with AI:
|
|
```bash
|
|
# Full slide (for PDF workflow)
|
|
python scripts/generate_slide_image.py "Title: Introduction\nContent: Key points" -o slide.png
|
|
|
|
# Visual only (for PPT workflow)
|
|
python scripts/generate_slide_image.py "Diagram description" -o figure.png --visual-only
|
|
|
|
# Options:
|
|
# -o, --output Output file path (required)
|
|
# --visual-only Generate just the visual, not complete slide
|
|
# --iterations N Max refinement iterations (default: 2)
|
|
# -v, --verbose Verbose output
|
|
```
|
|
|
|
**slides_to_pdf.py** - Combine slide images into PDF:
|
|
```bash
|
|
# From glob pattern
|
|
python scripts/slides_to_pdf.py slides/*.png -o presentation.pdf
|
|
|
|
# From directory (sorted by filename)
|
|
python scripts/slides_to_pdf.py slides/ -o presentation.pdf
|
|
|
|
# Options:
|
|
# -o, --output Output PDF path (required)
|
|
# --dpi N PDF resolution (default: 150)
|
|
# -v, --verbose Verbose output
|
|
```
|
|
|
|
### Validation Scripts
|
|
|
|
**validate_presentation.py**:
|
|
```bash
|
|
python scripts/validate_presentation.py presentation.pdf --duration 15
|
|
|
|
# Checks:
|
|
# - Slide count vs. recommended range
|
|
# - File size warnings
|
|
# - Slide dimensions
|
|
# - Font sizes (PowerPoint)
|
|
# - Compilation (Beamer)
|
|
```
|
|
|
|
**pdf_to_images.py**:
|
|
```bash
|
|
python scripts/pdf_to_images.py presentation.pdf output/slide --dpi 150
|
|
|
|
# Converts PDF to images for visual inspection
|
|
# Supports: JPG, PNG
|
|
# Adjustable DPI
|
|
# Page range selection
|
|
```
|
|
|
|
### PPTX Skill Scripts
|
|
|
|
From `skills/pptx/scripts/`:
|
|
- `thumbnail.py`: Create thumbnail grids
|
|
- `rearrange.py`: Duplicate and reorder slides
|
|
- `inventory.py`: Extract text content
|
|
- `replace.py`: Update text programmatically
|
|
|
|
### External Tools
|
|
|
|
**Recommended**:
|
|
- PDF viewer: For reviewing presentations
|
|
- Color contrast checker: WebAIM Contrast Checker
|
|
- Color blindness simulator: Coblis
|
|
- Timer app: For practice sessions
|
|
- Screen recorder: For self-review
|