diff --git a/assets/examples/achievements.svg b/assets/examples/achievements.svg new file mode 100644 index 0000000..278bc66 --- /dev/null +++ b/assets/examples/achievements.svg @@ -0,0 +1,72 @@ + + + + + + + + + ACHIEVEMENTS + + + + + + + + + + + + + Hackathon winner + Y Combinator AI Hackathon · 2025-11 + + + + + + + + + + Speaker at PyCon + Async at scale · 2024-05 + + + + + + + + + + Open Source Award + GitHub Stars program · 2024-01 + + + + + + + + + + + + + AWS Certified Solutions Architect + Professional · 2023-09 + + + \ No newline at end of file diff --git a/assets/examples/collaborators.svg b/assets/examples/collaborators.svg new file mode 100644 index 0000000..bab16c7 --- /dev/null +++ b/assets/examples/collaborators.svg @@ -0,0 +1,89 @@ + + + + + + + + + TOP COLLABORATORS + + + + + + T + torvalds + 4 repos · 142 commits + + + + + + + + + G + gaearon + 3 repos · 98 commits + + + + + + + + + S + sindresorhus + 2 repos · 64 commits + + + + + + + + + T + tj + 2 repos · 47 commits + + + + + + + + + Y + yyx990803 + 1 repos · 31 commits + + + + + + + \ No newline at end of file diff --git a/assets/examples/composite-clean.svg b/assets/examples/composite-clean.svg new file mode 100644 index 0000000..6297ab7 --- /dev/null +++ b/assets/examples/composite-clean.svg @@ -0,0 +1,543 @@ + + + + + + + + + + + + + + + + + + + + + + + A + + + + Developer Profile + + Score 88 / 100 + + + + + + + 1,423 + Commits + + + + 87 + PRs + + + + 342 + Stars + + + + 28 + Repos + + + + 156 + Followers + + + + + + + + + Backend + + + + + ML + + + + + Systems + + + + + Cloud + + + + + Founder #42 + + + + + Open source + + + + + + + + + + + + + + + IMPACT TIMELINE + + + + + + + + + 41200 + 2025-102026-012026-04 + + + + 577 + commits over 6mo + + + + + + + + + + + + + + STREAKS + + + CURRENT + 23 + + LONGEST + 61 + + + + + + + + Mar 30 – Today + Sep 13 – Nov 12, 2025 + + + + + + + + + + + + + TOP COLLABORATORS + + + + + + T + torvalds + 4 repos · 142 commits + + + + + + + + + G + gaearon + 3 repos · 98 commits + + + + + + + + + S + sindresorhus + 2 repos · 64 commits + + + + + + + + + T + tj + 2 repos · 47 commits + + + + + + + + + Y + yyx990803 + 1 repos · 31 commits + + + + + + + + + + + + + + + + + + RECENT FOCUS + + + + Backend + + + + + 412 commits + 38% + + + ML + + + + + 260 commits + 24% + + + Frontend + + + + + 195 commits + 18% + + + DevOps + + + + + 130 commits + 12% + + + Cloud + + + + + 87 commits + 8% + + Recent activity · last year + + + + + + + + + + + + + LANGUAGES + + + + + + + + + + + + + + + + + + + + + + + + + Python + + + + Python + 41% + + + + TypeScript + 23% + + + + Go + 15% + + + + Rust + 11% + + + + Shell + 6% + + + + Other + 4% + + + + + + + + + + + + + + + ACHIEVEMENTS + + + + + + + + + + + + + Hackathon winner + Y Combinator AI Hackathon · 2025-11 + + + + + + + + + + Speaker at PyCon + Async at scale · 2024-05 + + + + + + + + + + Open Source Award + GitHub Stars program · 2024-01 + + + + + + + + + + + + + AWS Certified Solutions Architect + Professional · 2023-09 + + + + + Generated with gh-stats + \ No newline at end of file diff --git a/assets/examples/composite-custom.svg b/assets/examples/composite-custom.svg new file mode 100644 index 0000000..2d3c19d --- /dev/null +++ b/assets/examples/composite-custom.svg @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + A + + + + Developer Profile + + Score 88 / 100 + + + + + + + 1,423 + Commits + + + + 87 + PRs + + + + 342 + Stars + + + + 28 + Repos + + + + 156 + Followers + + + + + + + + + Backend + + + + + ML + + + + + Systems + + + + + Cloud + + + + + Founder #42 + + + + + Open source + + + + + + + + + + + + + + + STREAKS + + + CURRENT + 23 + + LONGEST + 61 + + + + + + + + Mar 30 – Today + Sep 13 – Nov 12, 2025 + + + + + + + + + + + + + LANGUAGES + + + + + + + + + + + + + + + + + + + + + + + + + Python + + + + Python + 41% + + + + TypeScript + 23% + + + + Go + 15% + + + + Rust + 11% + + + + Shell + 6% + + + + Other + 4% + + + + + + Generated with gh-stats + \ No newline at end of file diff --git a/assets/examples/composite-midnight.svg b/assets/examples/composite-midnight.svg new file mode 100644 index 0000000..35ab6dc --- /dev/null +++ b/assets/examples/composite-midnight.svg @@ -0,0 +1,543 @@ + + + + + + + + + + + + + + + + + + + + + + + A + + + + Developer Profile + + Score 88 / 100 + + + + + + + 1,423 + Commits + + + + 87 + PRs + + + + 342 + Stars + + + + 28 + Repos + + + + 156 + Followers + + + + + + + + + Backend + + + + + ML + + + + + Systems + + + + + Cloud + + + + + Founder #42 + + + + + Open source + + + + + + + + + + + + + + + IMPACT TIMELINE + + + + + + + + + 41200 + 2025-102026-012026-04 + + + + 577 + commits over 6mo + + + + + + + + + + + + + + STREAKS + + + CURRENT + 23 + + LONGEST + 61 + + + + + + + + Mar 30 – Today + Sep 13 – Nov 12, 2025 + + + + + + + + + + + + + TOP COLLABORATORS + + + + + + T + torvalds + 4 repos · 142 commits + + + + + + + + + G + gaearon + 3 repos · 98 commits + + + + + + + + + S + sindresorhus + 2 repos · 64 commits + + + + + + + + + T + tj + 2 repos · 47 commits + + + + + + + + + Y + yyx990803 + 1 repos · 31 commits + + + + + + + + + + + + + + + + + + RECENT FOCUS + + + + Backend + + + + + 412 commits + 38% + + + ML + + + + + 260 commits + 24% + + + Frontend + + + + + 195 commits + 18% + + + DevOps + + + + + 130 commits + 12% + + + Cloud + + + + + 87 commits + 8% + + Recent activity · last year + + + + + + + + + + + + + LANGUAGES + + + + + + + + + + + + + + + + + + + + + + + + + Python + + + + Python + 41% + + + + TypeScript + 23% + + + + Go + 15% + + + + Rust + 11% + + + + Shell + 6% + + + + Other + 4% + + + + + + + + + + + + + + + ACHIEVEMENTS + + + + + + + + + + + + + Hackathon winner + Y Combinator AI Hackathon · 2025-11 + + + + + + + + + + Speaker at PyCon + Async at scale · 2024-05 + + + + + + + + + + Open Source Award + GitHub Stars program · 2024-01 + + + + + + + + + + + + + AWS Certified Solutions Architect + Professional · 2023-09 + + + + + Generated with gh-stats + \ No newline at end of file diff --git a/assets/examples/composite-nord.svg b/assets/examples/composite-nord.svg new file mode 100644 index 0000000..1a3dacf --- /dev/null +++ b/assets/examples/composite-nord.svg @@ -0,0 +1,543 @@ + + + + + + + + + + + + + + + + + + + + + + + A + + + + Developer Profile + + Score 88 / 100 + + + + + + + 1,423 + Commits + + + + 87 + PRs + + + + 342 + Stars + + + + 28 + Repos + + + + 156 + Followers + + + + + + + + + Backend + + + + + ML + + + + + Systems + + + + + Cloud + + + + + Founder #42 + + + + + Open source + + + + + + + + + + + + + + + IMPACT TIMELINE + + + + + + + + + 41200 + 2025-102026-012026-04 + + + + 577 + commits over 6mo + + + + + + + + + + + + + + STREAKS + + + CURRENT + 23 + + LONGEST + 61 + + + + + + + + Mar 30 – Today + Sep 13 – Nov 12, 2025 + + + + + + + + + + + + + TOP COLLABORATORS + + + + + + T + torvalds + 4 repos · 142 commits + + + + + + + + + G + gaearon + 3 repos · 98 commits + + + + + + + + + S + sindresorhus + 2 repos · 64 commits + + + + + + + + + T + tj + 2 repos · 47 commits + + + + + + + + + Y + yyx990803 + 1 repos · 31 commits + + + + + + + + + + + + + + + + + + RECENT FOCUS + + + + Backend + + + + + 412 commits + 38% + + + ML + + + + + 260 commits + 24% + + + Frontend + + + + + 195 commits + 18% + + + DevOps + + + + + 130 commits + 12% + + + Cloud + + + + + 87 commits + 8% + + Recent activity · last year + + + + + + + + + + + + + LANGUAGES + + + + + + + + + + + + + + + + + + + + + + + + + Python + + + + Python + 41% + + + + TypeScript + 23% + + + + Go + 15% + + + + Rust + 11% + + + + Shell + 6% + + + + Other + 4% + + + + + + + + + + + + + + + ACHIEVEMENTS + + + + + + + + + + + + + Hackathon winner + Y Combinator AI Hackathon · 2025-11 + + + + + + + + + + Speaker at PyCon + Async at scale · 2024-05 + + + + + + + + + + Open Source Award + GitHub Stars program · 2024-01 + + + + + + + + + + + + + AWS Certified Solutions Architect + Professional · 2023-09 + + + + + Generated with gh-stats + \ No newline at end of file diff --git a/assets/examples/composite-onyx.svg b/assets/examples/composite-onyx.svg new file mode 100644 index 0000000..74fcc8d --- /dev/null +++ b/assets/examples/composite-onyx.svg @@ -0,0 +1,543 @@ + + + + + + + + + + + + + + + + + + + + + + + A + + + + Developer Profile + + Score 88 / 100 + + + + + + + 1,423 + Commits + + + + 87 + PRs + + + + 342 + Stars + + + + 28 + Repos + + + + 156 + Followers + + + + + + + + + Backend + + + + + ML + + + + + Systems + + + + + Cloud + + + + + Founder #42 + + + + + Open source + + + + + + + + + + + + + + + IMPACT TIMELINE + + + + + + + + + 41200 + 2025-102026-012026-04 + + + + 577 + commits over 6mo + + + + + + + + + + + + + + STREAKS + + + CURRENT + 23 + + LONGEST + 61 + + + + + + + + Mar 30 – Today + Sep 13 – Nov 12, 2025 + + + + + + + + + + + + + TOP COLLABORATORS + + + + + + T + torvalds + 4 repos · 142 commits + + + + + + + + + G + gaearon + 3 repos · 98 commits + + + + + + + + + S + sindresorhus + 2 repos · 64 commits + + + + + + + + + T + tj + 2 repos · 47 commits + + + + + + + + + Y + yyx990803 + 1 repos · 31 commits + + + + + + + + + + + + + + + + + + RECENT FOCUS + + + + Backend + + + + + 412 commits + 38% + + + ML + + + + + 260 commits + 24% + + + Frontend + + + + + 195 commits + 18% + + + DevOps + + + + + 130 commits + 12% + + + Cloud + + + + + 87 commits + 8% + + Recent activity · last year + + + + + + + + + + + + + LANGUAGES + + + + + + + + + + + + + + + + + + + + + + + + + Python + + + + Python + 41% + + + + TypeScript + 23% + + + + Go + 15% + + + + Rust + 11% + + + + Shell + 6% + + + + Other + 4% + + + + + + + + + + + + + + + ACHIEVEMENTS + + + + + + + + + + + + + Hackathon winner + Y Combinator AI Hackathon · 2025-11 + + + + + + + + + + Speaker at PyCon + Async at scale · 2024-05 + + + + + + + + + + Open Source Award + GitHub Stars program · 2024-01 + + + + + + + + + + + + + AWS Certified Solutions Architect + Professional · 2023-09 + + + + + Generated with gh-stats + \ No newline at end of file diff --git a/assets/examples/composite-paper.svg b/assets/examples/composite-paper.svg new file mode 100644 index 0000000..ed10141 --- /dev/null +++ b/assets/examples/composite-paper.svg @@ -0,0 +1,543 @@ + + + + + + + + + + + + + + + + + + + + + + + A + + + + Developer Profile + + Score 88 / 100 + + + + + + + 1,423 + Commits + + + + 87 + PRs + + + + 342 + Stars + + + + 28 + Repos + + + + 156 + Followers + + + + + + + + + Backend + + + + + ML + + + + + Systems + + + + + Cloud + + + + + Founder #42 + + + + + Open source + + + + + + + + + + + + + + + IMPACT TIMELINE + + + + + + + + + 41200 + 2025-102026-012026-04 + + + + 577 + commits over 6mo + + + + + + + + + + + + + + STREAKS + + + CURRENT + 23 + + LONGEST + 61 + + + + + + + + Mar 30 – Today + Sep 13 – Nov 12, 2025 + + + + + + + + + + + + + TOP COLLABORATORS + + + + + + T + torvalds + 4 repos · 142 commits + + + + + + + + + G + gaearon + 3 repos · 98 commits + + + + + + + + + S + sindresorhus + 2 repos · 64 commits + + + + + + + + + T + tj + 2 repos · 47 commits + + + + + + + + + Y + yyx990803 + 1 repos · 31 commits + + + + + + + + + + + + + + + + + + RECENT FOCUS + + + + Backend + + + + + 412 commits + 38% + + + ML + + + + + 260 commits + 24% + + + Frontend + + + + + 195 commits + 18% + + + DevOps + + + + + 130 commits + 12% + + + Cloud + + + + + 87 commits + 8% + + Recent activity · last year + + + + + + + + + + + + + LANGUAGES + + + + + + + + + + + + + + + + + + + + + + + + + Python + + + + Python + 41% + + + + TypeScript + 23% + + + + Go + 15% + + + + Rust + 11% + + + + Shell + 6% + + + + Other + 4% + + + + + + + + + + + + + + + ACHIEVEMENTS + + + + + + + + + + + + + Hackathon winner + Y Combinator AI Hackathon · 2025-11 + + + + + + + + + + Speaker at PyCon + Async at scale · 2024-05 + + + + + + + + + + Open Source Award + GitHub Stars program · 2024-01 + + + + + + + + + + + + + AWS Certified Solutions Architect + Professional · 2023-09 + + + + + Generated with gh-stats + \ No newline at end of file diff --git a/assets/examples/focus.svg b/assets/examples/focus.svg new file mode 100644 index 0000000..c6dfe14 --- /dev/null +++ b/assets/examples/focus.svg @@ -0,0 +1,76 @@ + + + + + + + + + RECENT FOCUS + + + + Backend + + + + + 412 commits + 38% + + + ML + + + + + 260 commits + 24% + + + Frontend + + + + + 195 commits + 18% + + + DevOps + + + + + 130 commits + 12% + + + Cloud + + + + + 87 commits + 8% + + Recent activity · last year + + \ No newline at end of file diff --git a/assets/examples/grade-compact.svg b/assets/examples/grade-compact.svg new file mode 100644 index 0000000..97848d4 --- /dev/null +++ b/assets/examples/grade-compact.svg @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + A + + + + Developer Profile + + Score 88 / 100 + + + + + + + 1,423 + Commits + + + + 87 + PRs + + + + 342 + Stars + + + + 28 + Repos + + + + 156 + Followers + + + + + + + + + Backend + + + + + ML + + + + + Systems + + + + \ No newline at end of file diff --git a/assets/examples/grade.svg b/assets/examples/grade.svg new file mode 100644 index 0000000..6c82854 --- /dev/null +++ b/assets/examples/grade.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + A + + + + Developer Profile + + Score 88 / 100 + + + + + + + 1,423 + Commits + + + + 87 + PRs + + + + 342 + Stars + + + + 28 + Repos + + + + 156 + Followers + + + + + + + + + Backend + + + + + ML + + + + + Systems + + + + + Cloud + + + + + Founder #42 + + + + + Open source + + + + \ No newline at end of file diff --git a/assets/examples/impact-purple.svg b/assets/examples/impact-purple.svg new file mode 100644 index 0000000..0884123 --- /dev/null +++ b/assets/examples/impact-purple.svg @@ -0,0 +1,30 @@ + + + + + + + + + IMPACT TIMELINE + + + + + + + + + 41200 + 2025-102026-012026-04 + + + + 577 + commits over 6mo + + + \ No newline at end of file diff --git a/assets/examples/impact.svg b/assets/examples/impact.svg new file mode 100644 index 0000000..b3fda98 --- /dev/null +++ b/assets/examples/impact.svg @@ -0,0 +1,30 @@ + + + + + + + + + IMPACT TIMELINE + + + + + + + + + 41200 + 2025-102026-012026-04 + + + + 577 + commits over 6mo + + + \ No newline at end of file diff --git a/assets/examples/languages-hide.svg b/assets/examples/languages-hide.svg new file mode 100644 index 0000000..eadb7ee --- /dev/null +++ b/assets/examples/languages-hide.svg @@ -0,0 +1,71 @@ + + + + + + + + + LANGUAGES + + + + + + + + + + + + + + + + + + + Python + + + + Python + 46% + + + + TypeScript + 26% + + + + Go + 17% + + + + Rust + 12% + + + + \ No newline at end of file diff --git a/assets/examples/languages.svg b/assets/examples/languages.svg new file mode 100644 index 0000000..e2983e6 --- /dev/null +++ b/assets/examples/languages.svg @@ -0,0 +1,95 @@ + + + + + + + + + LANGUAGES + + + + + + + + + + + + + + + + + + + + + + + + + Python + + + + Python + 41% + + + + TypeScript + 23% + + + + Go + 15% + + + + Rust + 11% + + + + Shell + 6% + + + + Other + 4% + + + + \ No newline at end of file diff --git a/assets/examples/streaks-green.svg b/assets/examples/streaks-green.svg new file mode 100644 index 0000000..f408b06 --- /dev/null +++ b/assets/examples/streaks-green.svg @@ -0,0 +1,43 @@ + + + + + + + + + STREAKS + + + CURRENT + 23 + + LONGEST + 61 + + + + + + + + Mar 30 – Today + Sep 13 – Nov 12, 2025 + + \ No newline at end of file diff --git a/assets/examples/streaks.svg b/assets/examples/streaks.svg new file mode 100644 index 0000000..1f0b48b --- /dev/null +++ b/assets/examples/streaks.svg @@ -0,0 +1,43 @@ + + + + + + + + + STREAKS + + + CURRENT + 23 + + LONGEST + 61 + + + + + + + + Mar 30 – Today + Sep 13 – Nov 12, 2025 + + \ No newline at end of file diff --git a/generator/scripts/gen_readme_examples.py b/generator/scripts/gen_readme_examples.py new file mode 100644 index 0000000..9dd6215 --- /dev/null +++ b/generator/scripts/gen_readme_examples.py @@ -0,0 +1,213 @@ +"""Generate static SVG examples for the README. + +Renders each widget plus the composite card in every built-in theme using +plausible hand-crafted model instances. Outputs go to +`screenshots/examples/`. Run from the repo root: + + cd generator && python -m scripts.gen_readme_examples + +No GitHub calls, no fetcher, no database. +""" +from __future__ import annotations + +import os +import pathlib +import sys +from datetime import date, timedelta + +# Ensure `src` package is importable when running `python -m scripts.*`. +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +from src.models import ( + AchievementData, + CollaboratorData, + FocusCategory, + GradeData, + ImpactWeek, + LanguageData, + StreakData, + TagData, +) +from src.widgets import ( + render_achievements_widget, + render_collaborators_widget, + render_focus_widget, + render_grade_widget, + render_impact_widget, + render_languages_widget, + render_streaks_widget, +) +from src.widgets.composite import compose_widget + + +OUT = pathlib.Path(__file__).resolve().parents[2] / "assets" / "examples" +OUT.mkdir(parents=True, exist_ok=True) + + +def grade_sample() -> GradeData: + return GradeData( + grade="A", + score=88.4, + stats={"commits": 1423, "prs": 87, "stars": 342, "repos": 28, "followers": 156}, + tags=[ + TagData(tag="Backend", source="earned", confidence=0.95), + TagData(tag="ML", source="earned", confidence=0.82), + TagData(tag="Systems", source="earned", confidence=0.70), + TagData(tag="Cloud", source="earned", confidence=0.60), + TagData(tag="founder", source="earned", label="Founder #42"), + TagData(tag="Open Source", source="chosen"), + ], + ) + + +def impact_sample() -> list[ImpactWeek]: + today = date.today() + start = today - timedelta(days=7 * 26) + pattern = [3, 5, 8, 6, 11, 14, 9, 12, 18, 22, 17, 19, 25, 21, 28, 32, 26, 24, + 30, 35, 29, 33, 41, 38, 34, 37] + weeks: list[ImpactWeek] = [] + for i, count in enumerate(pattern): + weeks.append(ImpactWeek(week_start=(start + timedelta(days=7 * i)).isoformat(), + commits=count)) + return weeks + + +def streaks_sample() -> StreakData: + today = date.today() + return StreakData( + current=23, + max=61, + current_start=(today - timedelta(days=22)).isoformat(), + last_active_date=today.isoformat(), + max_start=(today - timedelta(days=220)).isoformat(), + max_end=(today - timedelta(days=160)).isoformat(), + ) + + +def collaborators_sample() -> list[CollaboratorData]: + return [ + CollaboratorData(username="torvalds", shared_repos=4, shared_commits=142), + CollaboratorData(username="gaearon", shared_repos=3, shared_commits=98), + CollaboratorData(username="sindresorhus", shared_repos=2, shared_commits=64), + CollaboratorData(username="tj", shared_repos=2, shared_commits=47), + CollaboratorData(username="yyx990803", shared_repos=1, shared_commits=31), + ] + + +def focus_sample() -> list[FocusCategory]: + return [ + FocusCategory(category="Backend", percentage=38.0, commit_count=412), + FocusCategory(category="ML", percentage=24.0, commit_count=260), + FocusCategory(category="Frontend", percentage=18.0, commit_count=195), + FocusCategory(category="DevOps", percentage=12.0, commit_count=130), + FocusCategory(category="Cloud", percentage=8.0, commit_count=87), + ] + + +def languages_sample() -> list[LanguageData]: + return [ + LanguageData(language="Python", percentage=41.0, loc=180_432), + LanguageData(language="TypeScript", percentage=23.0, loc=102_310), + LanguageData(language="Go", percentage=15.0, loc=66_540), + LanguageData(language="Rust", percentage=11.0, loc=48_210), + LanguageData(language="Shell", percentage=6.0, loc=27_004), + LanguageData(language="Dockerfile", percentage=4.0, loc=18_120), + ] + + +def achievements_sample() -> list[AchievementData]: + return [ + AchievementData(title="Hackathon winner", + subtitle="Y Combinator AI Hackathon", + event_date="2025-11", + icon="hackathon"), + AchievementData(title="Speaker at PyCon", + subtitle="Async at scale", + event_date="2024-05", + icon="star"), + AchievementData(title="Open Source Award", + subtitle="GitHub Stars program", + event_date="2024-01", + icon="trophy"), + AchievementData(title="AWS Certified Solutions Architect", + subtitle="Professional", + event_date="2023-09", + icon="medal"), + ] + + +def render_all(theme: str, widget_settings: dict | None = None) -> dict[str, str]: + ws = widget_settings or {} + widgets = { + "grade": render_grade_widget(grade_sample(), theme, settings=ws.get("grade")), + "impact": render_impact_widget(impact_sample(), theme, settings=ws.get("impact")), + "streaks": render_streaks_widget(streaks_sample(), theme, settings=ws.get("streaks")), + "collaborators": render_collaborators_widget(collaborators_sample(), theme, settings=ws.get("collaborators")), + "focus": render_focus_widget(focus_sample(), theme, settings=ws.get("focus")), + "languages": render_languages_widget(languages_sample(), theme, settings=ws.get("languages")), + "achievements": render_achievements_widget(achievements_sample(), theme, settings=ws.get("achievements")), + } + return widgets + + +def write(name: str, svg: str) -> None: + (OUT / name).write_text(svg) + print(f" wrote {name} ({len(svg)}B)") + + +def main() -> None: + print(f"generating into {OUT}") + + # Individual widgets in the default theme. + default = render_all("dark") + for key, svg in default.items(): + write(f"{key}.svg", svg) + + # Composite card in every theme. + for theme in ("dark", "onyx", "nord", "light", "paper"): + widgets = render_all(theme) + svg = compose_widget( + widgets=widgets, + enabled=["grade", "impact", "streaks", "collaborators", "focus", "languages", "achievements"], + theme_name=theme, + username="demo", + show_name=False, + ) + label = {"dark": "midnight", "light": "clean"}.get(theme, theme) + write(f"composite-{label}.svg", svg) + + # Customization demos. + purple_impact = render_impact_widget(impact_sample(), "dark", + settings={"line_color": "#a78bfa"}) + write("impact-purple.svg", purple_impact) + + green_streaks = render_streaks_widget(streaks_sample(), "dark", + settings={"color": "#3fb950"}) + write("streaks-green.svg", green_streaks) + + compact_grade = render_grade_widget(grade_sample(), "dark", + settings={"max_tags": 3}) + write("grade-compact.svg", compact_grade) + + hidden_langs = render_languages_widget( + [l for l in languages_sample() if l.language not in {"Shell", "Dockerfile"}], + "dark", + ) + write("languages-hide.svg", hidden_langs) + + # Composite picking only a few widgets, onyx theme. + onyx_widgets = render_all("onyx") + svg = compose_widget( + widgets={k: onyx_widgets[k] for k in ("grade", "streaks", "languages")}, + enabled=["grade", "streaks", "languages"], + theme_name="onyx", + username="demo", + show_name=False, + ) + write("composite-custom.svg", svg) + + print("done") + + +if __name__ == "__main__": + main()