From 7943d5aa8932ce58ee6f588437f90324bad02d10 Mon Sep 17 00:00:00 2001 From: shay Date: Fri, 17 Apr 2026 16:16:24 -0400 Subject: [PATCH] feat(readme): add detailed usage instructions and widget descriptions --- README.md | 91 ++++++++++++++++++++++++++++++++++++++++++- data/ghstats.db | Bin 1400832 -> 1400832 bytes src/generator_api.py | 28 +++++++++++++ widget_shaymanor.svg | 30 ++++++++++++++ 4 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 widget_shaymanor.svg diff --git a/README.md b/README.md index b9bfacb..2f0e425 100644 --- a/README.md +++ b/README.md @@ -1 +1,90 @@ -# github-readme-stats \ No newline at end of file +# GitHub README Stats + +Generate polished SVG profile cards from your GitHub data. Fetches your repos, contributions, languages, and collaborators, then renders them into composable widgets you can drop into your profile README. + +

+ Example composite widget +

+ +## Widgets + +| Widget | What it shows | +|--------|--------------| +| **Grade** | Letter grade (S through F) with score breakdown, stats, and inferred role tags | +| **Impact** | Contribution timeline over the last 6 months | +| **Collaborators** | Top people you've committed alongside, ranked by shared commits | +| **Focus** | Where your recent work falls (Backend, Frontend, ML, DevOps, etc.) | +| **Languages** | Donut chart of your most-used languages by LOC | +| **Achievements** | Custom badges you define (hackathons, awards, milestones) | + +Each widget is also saved individually as `widget_.svg`. + +## Quick Start + +```bash +# Basic (public data only) +python run.py + +# With a GitHub token for full commit/contribution data +GITHUB_PAT= python run.py + +# Choose a theme +python run.py nord +``` + +Output lands in the repo root as `widget_.svg`. + +## Themes + +Five built-in themes: + +| Theme | Style | +|-------|-------| +| `midnight` / `dark` | Dark blue-gray (default) | +| `onyx` | High-contrast on near-black | +| `nord` | Muted pastels on slate | +| `clean` / `light` | White background | +| `paper` | Warm off-white, sepia accents | + +## Web UI + +A React frontend lets you customize widgets interactively with live preview and per-widget advanced settings (colors, counts, etc.). + +```bash +# Terminal 1 — start the generator API +python -m src.generator_api # :5002 + +# Terminal 2 — start the frontend +cd frontend && npm install && npm run dev # :3000 +``` + +Open `http://localhost:3000`, enter a GitHub username, tweak settings, and hit Generate. + +## Configuration + +All tuning lives in `src/config.py` and can be overridden with environment variables. Key knobs: + +| Variable | Default | What it does | +|----------|---------|-------------| +| `GITHUB_PAT` | — | GitHub personal access token | +| `COMMIT_MAX_REPOS` | 10 | Max repos to scan for commits | +| `COMMIT_PER_REPO` | 30 | Max commits per repo | +| `COLLABORATOR_MIN_COMMITS` | 3 | Minimum shared commits to show a collaborator | +| `API_TIMEOUT` | 5 | Per-request timeout in seconds | + +See [CONFIGURATION.md](CONFIGURATION.md) for the full list. + +## Project Structure + +``` +src/ + data/ # GitHub API fetching + data processing + widgets/ # One SVG renderer per widget + themes/ # Color palettes + models/ # Typed data structures + utils/ # SVG helpers + config.py # All tunables + generate.py # CLI entry point + generator_api.py # Flask API for the web UI +frontend/ # React + TypeScript + Vite +``` diff --git a/data/ghstats.db b/data/ghstats.db index daa2ac8331a1624e43c98ac74b883bb7e629c006..4afa5c206de4f89dfb89aca4344072eaad270a8e 100644 GIT binary patch delta 266 zcmZoT5ZZ7cbb>Ua+(a2?M!Ag%Gwj(dtPBjSjLn+=+qeI>X9Qv0K~Fmod5s; delta 270 zcmZoT5ZZ7cbb>Ua>_i!7M%j%CGwj*TtxQa<42+up+qeI>X9QvmX?&9UbmNX1B!s(K2ATlK&HIy^auMmn_vRdGxu|L!8q-|_HzO;7Z7s;F%J;) a0x=&D^8>K}5DNma5D*J*|FvI)Z2 + + + + + + + shaymanor + + + + + + + + + Generated with ♥ + \ No newline at end of file