wyattowalsh docs

Banner Generator

Procedural SVG banner with chaos-attractor backgrounds, SVGO optimization, and automatic dark-mode derivation.

Module

scripts/banner.py — ~1878 lines. Heavy dependency on svgwrite and numpy.

scripts/banner_patterns.pyPatternType enum extracted for zero-dep import.

Entry point

from scripts.banner import generate_banner, BannerConfig

cfg = BannerConfig(
    title="Wyatt Walsh",
    subtitle="Software Engineer & AI Enthusiast",
    output_path=Path(".github/assets/img/banner.svg"),
    width=1200,
    height=630,
    optimize_with_svgo=True,
    dark_mode=False,
)
generate_banner(cfg=cfg)

generate_banner is called twice by the CLI: once for dark_mode=False (light), once for dark_mode=True (dark). The dark output path is derived automatically by inserting -dark before the extension.

BannerConfig fields

FieldTypeDefaultNotes
titlestr"Wyatt Walsh"Main heading
subtitlestr"Software Engineer & AI Enthusiast"
output_pathPath.github/assets/img/banner.svg
widthint1200Canvas width (px)
heightint630Canvas height (px)
optimize_with_svgoboolTrueRun SVGO after writing
dark_modeboolFalseToggle dark palette
pattern_densityfloat2.0Background pattern density
layer_countint4Attractor layer count
make_responsiveboolTrueAdd CSS viewBox responsiveness

PatternType

Defined in scripts/banner_patterns.py. Live variants:

ValueDescription
LORENZLorenz strange attractor
NEURALNeural-network node graph
FLOWPerlin flow field
MICROMicro-geometry lattice
AIZAWAAizawa attractor

Dead variants (draw functions not yet implemented): REACTION, CLIFFORD, FLAME, PDJ, IKEDA.

The active pattern is chosen automatically based on the metrics hash. All five live patterns may appear in generated output.

SVGO optimization

If optimize_with_svgo=True and svgo is on PATH, the generated SVG is piped through SVGO to reduce file size. Falls back silently if SVGO is unavailable.

Output files

FileDescription
banner.svgLight-mode banner
banner-dark.svgDark-mode banner (auto-derived path)