|
|
""" |
|
|
Legacy promptkit module for EceMotion Pictures. |
|
|
Maintained for backward compatibility. |
|
|
""" |
|
|
|
|
|
from dataclasses import dataclass |
|
|
from typing import Dict, List |
|
|
import random |
|
|
|
|
|
TAGLINES = [ |
|
|
"So retro, it's the future.", |
|
|
"Pixels you can trust.", |
|
|
"VHS vibes. Modern results.", |
|
|
"Old-school cool. New-school sales.", |
|
|
"EceMotion Pictures - Bringing the '80s back to life.", |
|
|
"Your story, our vision, timeless memories.", |
|
|
] |
|
|
|
|
|
VOICE_STYLES = { |
|
|
"Announcer '80s": "A confident, upbeat 1980s TV announcer with warm AM-radio tone.", |
|
|
"Mall PA": "Casual, slightly echoey mall public-address vibe.", |
|
|
"Late Night": "Low energy, sly late-night infomercial style.", |
|
|
"News Anchor": "Professional, authoritative news anchor delivery.", |
|
|
"Infomercial": "Enthusiastic, persuasive infomercial host style.", |
|
|
"Radio DJ": "Smooth, charismatic radio disc jockey voice.", |
|
|
} |
|
|
|
|
|
STRUCTURE_TEMPLATES = [ |
|
|
"Montage → Close-up → Logo stinger", |
|
|
"Before/After → Feature highlight → CTA", |
|
|
"Testimonial → B-roll → Price tag reveal", |
|
|
"Unboxing → Demo → Deal countdown", |
|
|
"Retro news bulletin → Product shot → Tagline", |
|
|
"Opening hook → Problem/Solution → Call to action", |
|
|
"Brand story → Product showcase → Final tagline", |
|
|
] |
|
|
|
|
|
@dataclass |
|
|
class AdPlan: |
|
|
brand: str |
|
|
structure: str |
|
|
script_prompt: str |
|
|
duration: int |
|
|
voice_style: str |
|
|
seed: int |
|
|
|
|
|
def script(self) -> Dict[str, str]: |
|
|
random.seed(self.seed) |
|
|
tl = random.choice(TAGLINES) |
|
|
structure = self.structure.strip() or random.choice(STRUCTURE_TEMPLATES) |
|
|
|
|
|
beats = [ |
|
|
f"HOOK: {self.brand} — {self.script_prompt}", |
|
|
f"FLOW: {structure}", |
|
|
"BENEFIT: Faster, simpler, cooler — like your favorite retro tech.", |
|
|
f"CTA: Try {self.brand} today. {tl}", |
|
|
] |
|
|
vo = " ".join([b.split(': ',1)[1] for b in beats]) |
|
|
return {"lines": beats, "voiceover": vo, "tagline": tl} |
|
|
|
|
|
def suggest_scripts(structure_prompt: str, n: int = 6, seed: int = 0) -> List[str]: |
|
|
"""Return n short script ideas correlated with the structure prompt.""" |
|
|
random.seed(seed) |
|
|
base = (structure_prompt or "").lower().strip() |
|
|
ideas = [] |
|
|
for _ in range(n): |
|
|
style = random.choice(["infomercial", "mall ad", "late-night", "newsflash", "arcade bumper"]) |
|
|
shot = random.choice(["neon grid", "CRT scanlines", "vaporwave sunset", "shopping mall", "boombox close-up"]) |
|
|
hook = random.choice([ |
|
|
"Remember this sound?", "Back to '87.", "Deal of the decade.", "We paused time.", "Be kind, rewind your brand.", |
|
|
]) |
|
|
idea = f"{hook} {style} with {shot}." |
|
|
|
|
|
for kw in ["montage","testimonial","news","unboxing","before","after","countdown","logo","cta"]: |
|
|
if kw in base and kw not in idea: |
|
|
idea += f" Includes {kw}." |
|
|
ideas.append(idea) |
|
|
return ideas |
|
|
|
|
|
def roll_script(structure_prompt: str, seed: int = 0) -> str: |
|
|
return random.choice(suggest_scripts(structure_prompt, n=6, seed=seed)) |
|
|
|