ScriptsGenerative Art
Generative Art
Lorenz / neural / flow-field SVG art seeded deterministically from GitHub metrics.
Modules
scripts/generative.py— top-level orchestratorscripts/art/shared.py—seed_hash(),_hex_slice(),Noise2Dscripts/banner_patterns.py—PatternTypeenum (shared with banner)
How it works
fetch_metricsfetches live GitHub data →metrics.jsonseed_hash(metrics)produces a stable SHA-256 hex string from the metrics dict- The seed initializes numpy's
default_rng— output is fully deterministic for a given metrics snapshot - Four SVG files are generated: activity (light/dark) + community (light/dark)
Entry points
from scripts.generative import generate_community_art, generate_activity_art
generate_activity_art(metrics=metrics_dict)
generate_community_art(metrics=metrics_dict)CLI
# Fetch metrics first
uv run python -m scripts.fetch_metrics \
--owner wyattowalsh \
--repo wyattowalsh \
--output /tmp/metrics.json
# Generate art from metrics
uv run python -m scripts.cli generate generative \
--metrics-path /tmp/metrics.jsonOutput files
| File | Description |
|---|---|
.github/assets/img/generative-activity.svg | Activity-seeded attractor (light) |
.github/assets/img/generative-activity-dark.svg | Activity-seeded attractor (dark) |
.github/assets/img/generative-community.svg | Community-seeded attractor (light) |
.github/assets/img/generative-community-dark.svg | Community-seeded attractor (dark) |
PatternType selection
The active pattern is chosen based on metrics hash characteristics — callers don't select it manually. All five live PatternType values (LORENZ, NEURAL, FLOW, MICRO, AIZAWA) may appear.