#!/usr/bin/env python3
"""Generate ShieldAI ad creative SVGs for Google Display and Meta campaigns."""
import os
OUT = os.path.join(os.path.dirname(__file__))
# Brand colors
DARK_BG = "#0a0f1e"
CARD_BG = "#1a2332"
TEXT_PRIMARY = "#f1f5f9"
TEXT_SECONDARY = "#94a3b8"
TEXT_MUTED = "#64748b"
ACCENT_BLUE = "#3b82f6"
ACCENT_CYAN = "#06b6d4"
SUCCESS = "#22c55e"
ERROR = "#ef4444"
WARNING = "#f59e0b"
BORDER = "#1e293b"
def shield_logo_svg(size=40, x=0, y=0):
return f'''
'''
def brand_bar(w, h):
return f''''''
def safe_text(text, max_len=80):
return text[:max_len] if len(text) > max_len else text
# ============================================================
# GOOGLE DISPLAY ASSETS
# ============================================================
def gd_square():
"""1:1 (1200x1200) — '3 Protections, 1 Platform' three-icon panel"""
w, h = 1200, 1200
icon_size = 100
box_w, box_h = 280, 320
gap = 60
total_w = 3 * box_w + 2 * gap
start_x = (w - total_w) // 2
top_y = 300
icons_data = [
("VoicePrint", "AI Voice Clone Detection", ACCENT_CYAN, [
"M0,-40 Q30,-35 40,-10 Q45,5 35,20 L25,30 L0,40 L-25,30 L-35,20 Q-45,5 -40,-10 Q-30,-35 0,-40 Z",
"M-12,0 L-4,8 L12,-10"
]),
("DarkWatch", "Dark Web Monitoring", ACCENT_BLUE, [
"M-35,-30 L35,-30 L40,10 Q40,30 25,40 L0,45 L-25,40 Q-40,30 -40,10 Z",
"M0,5 L0,25 M-10,15 L10,15"
]),
("SpamShield", "Spam Call & Text Blocking", SUCCESS, [
"M-40,-10 Q-40,-40 0,-40 Q40,-40 40,-10 Q40,15 20,30 L0,40 L-20,30 Q-40,15 -40,-10 Z",
"M-15,0 L-5,10 L18,-12"
]),
]
svg = f''''''
return svg
def gd_landscape():
"""1.91:1 (1200x628) — 'Your Family Deserves AI Protection' family + shield"""
w, h = 1200, 628
svg = f''''''
return svg
def gd_portrait():
"""4:5 (600x750) — 'Voice Clone Detection' phone call visualization"""
w, h = 600, 750
svg = f''''''
return svg
# ============================================================
# META CREATIVE A: Voice Clone Threat
# ============================================================
def meta_a_1x1():
"""1:1 (1080x1080) — split-screen family / AI distortion"""
w, h = 1080, 1080
half = w // 2
svg = f''''''
return svg
def meta_a_191():
"""1.91:1 (1200x628) — split-screen family / AI distortion"""
w, h = 1200, 628
half = w // 2
svg = f''''''
return svg
# ============================================================
# META CREATIVE B: Dark Web
# ============================================================
def meta_b_1x1():
"""1:1 (1080x1080) — dark terminal HUD aesthetic"""
w, h = 1080, 1080
svg = f''''''
return svg
def meta_b_45():
"""4:5 (1080x1350) — dark terminal HUD"""
w, h = 1080, 1350
svg = f''''''
return svg
# ============================================================
# META CREATIVE C: 3 Protections
# ============================================================
def meta_c_1x1():
"""1:1 (1080x1080) — three-panel layout"""
w, h = 1080, 1080
panel_w, panel_h = 300, 400
gap = 30
total_w = 3 * panel_w + 2 * gap
start_x = (w - total_w) // 2
top_y = 280
panels = [
("VoicePrint", ACCENT_CYAN, "AI Voice Clone\nDetection", "Real-time detection\nof synthetic voices\nwith 99.7% accuracy"),
("DarkWatch", ACCENT_BLUE, "Dark Web\nMonitoring", "24/7 scanning of\n150+ marketplaces\nfor your data"),
("SpamShield", SUCCESS, "Spam Call &\nText Blocking", "AI-powered filtering\nof spam calls\nand text messages"),
]
svg = f''''''
return svg
# ============================================================
# META CREATIVE D: Family Protection
# ============================================================
def meta_d_base(w, h, small=False):
"""Family protection — multi-generational family with digital shield overlay"""
svg = f''''''
return svg
def g_family_figures(w, h):
"""Generate simple family figure silhouettes."""
cx = w // 2
base_y = h // 2 + 60
return f'''
'''
def meta_d_1x1():
return meta_d_base(1080, 1080)
def meta_d_191():
return meta_d_base(1200, 628)
def meta_d_45():
return meta_d_base(1080, 1350)
# ============================================================
# GENERATE ALL
# ============================================================
if __name__ == "__main__":
assets = [
# Google Display
("gd_square_1200x1200.svg", gd_square()),
("gd_landscape_1200x628.svg", gd_landscape()),
("gd_portrait_600x750.svg", gd_portrait()),
# Meta Creative A
("meta_a_1x1_1080x1080.svg", meta_a_1x1()),
("meta_a_191_1200x628.svg", meta_a_191()),
# Meta Creative B
("meta_b_1x1_1080x1080.svg", meta_b_1x1()),
("meta_b_45_1080x1350.svg", meta_b_45()),
# Meta Creative C
("meta_c_1x1_1080x1080.svg", meta_c_1x1()),
# Meta Creative D
("meta_d_1x1_1080x1080.svg", meta_d_1x1()),
("meta_d_191_1200x628.svg", meta_d_191()),
("meta_d_45_1080x1350.svg", meta_d_45()),
]
for name, svg in assets:
path = os.path.join(OUT, name)
with open(path, 'w') as f:
f.write(svg)
print(f"Created: {name} ({len(svg)} bytes)")
print(f"\nDone. Generated {len(assets)} SVG files in {OUT}")