Skip to main content

Enrich markdown slide decks with images

Project description

slide-vision

Enrich markdown slide decks with images — from local folders, DALL-E 3, Pexels, or Unsplash.

Install

pip install slide-vision
# With DALL-E support:
pip install slide-vision[openai]

Quick start

# Create config
slide-vision init

# Enrich a slide deck (uses configured providers)
slide-vision enrich presentation.md

# Skip all APIs — just produce image prompts
slide-vision enrich presentation.md --source none

# Use local images + Pexels fallback
slide-vision enrich presentation.md --source local,pexels --local-dir ./images/

# Also produce a .zip
slide-vision enrich presentation.md --zip

Pre-process local images

Use scan to AI-rename your local images for better keyword matching:

slide-vision scan ./my-images/ --provider openai --dry-run
slide-vision scan ./my-images/ --provider openai

Output structure

presentation-enriched/
├── presentation.md    # enriched markdown with image tags
├── images/            # all sourced images
└── prompts.md         # AI prompts for slides without images (if any)

API keys

Provider Environment variable
DALL-E 3 OPENAI_API_KEY
Pexels PEXELS_API_KEY
Unsplash UNSPLASH_ACCESS_KEY

Check status: slide-vision providers

Custom providers

Bring your own image source or vision model — no fork required.

Quickest: a module:Attribute import spec. Point --source (or scan --provider) at any importable object. An image provider just needs a get_image(slide, output_dir) method; a vision provider is any callable(path) -> str.

# Your own image provider class
slide-vision enrich deck.md --source mypkg.providers:MyProvider

# Mix it with builtins — first hit wins
slide-vision enrich deck.md --source local,mypkg.providers:MyProvider --local-dir ./img

# Your own vision model for scan
slide-vision scan ./img/ --provider mypkg.vision:describe

Image provider contract (implements the ImageProvider protocol):

from slide_vision.providers.base import ImageResult

class MyProvider:
    name = "mine"
    def is_available(self) -> bool: ...
    def get_image(self, slide, output_dir) -> ImageResult | None: ...

Publishable plugins (entry points). Ship a package that registers under slide_vision.providers (images) or slide_vision.vision_providers (scan); once installed it's usable by name and shows up in slide-vision providers:

[project.entry-points."slide_vision.providers"]
gemini = "slide_vision_gemini:GeminiProvider"

[project.entry-points."slide_vision.vision_providers"]
claude = "slide_vision_claude:describe"

Programmatic registration (in your own scripts):

from slide_vision.providers.factory import register_provider
from slide_vision.scanner import register_vision_provider

register_provider("mine", lambda ctx: MyProvider())
register_vision_provider("mine", lambda path: "a caption")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slide_vision-0.2.0.tar.gz (87.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slide_vision-0.2.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file slide_vision-0.2.0.tar.gz.

File metadata

  • Download URL: slide_vision-0.2.0.tar.gz
  • Upload date:
  • Size: 87.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for slide_vision-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6a7c27ab71a79ea91963328856228a29d5ead26bf06651936545c9d53cc4b6c9
MD5 b715f805975a7335b7847aebac4ac515
BLAKE2b-256 1f82db92261d399bd3d5b31e1d95a639e28553bffc37df6e5295f69cf554aac5

See more details on using hashes here.

File details

Details for the file slide_vision-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: slide_vision-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for slide_vision-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 146e1d127653b3df3ad8b2663ab758f3befd32ed3645c2de3735b1554ae833f0
MD5 05536ffc97913bd519849f238e464f36
BLAKE2b-256 c2f7464a9bf045588c335820fd54ede8caadbc8bafe3eb39128f71fc93e8a04e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page