Skip to content

Turn your Strava and Garmin activities into GitHub-style contribution heatmaps.

License

Notifications You must be signed in to change notification settings

thaberkern/git-sweaty

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workout --> GitHub Heatmap Dashboard

Turn your Strava and Garmin activities into GitHub-style contribution heatmaps.
Automatically generates a free, interactive dashboard updated daily on GitHub Pages.
No coding required.

  • View the Interactive Activity Dashboard
  • Once setup is complete, this dashboard link will automatically update to your own GitHub Pages URL.

Dashboard Preview

Quick Start

Run:

bash <(curl -fsSL https://raw.githubusercontent.com/aspain/git-sweaty/main/scripts/bootstrap.sh)

You will be prompted for:

  • Setup mode:
    • Local: setup script will create the fork, clone the repo, and complete the rest of the setup.
    • Online (default): no local clone; setup script will configure a fork or an existing writable repo
  • GitHub Pages custom domain (if you have one, for example strava.example.com)
  • Source (strava or garmin)
  • Unit preference (US or Metric)
  • Heatmap week start (Sunday or Monday)

The setup may take several minutes to complete when run for the first time. If any automation step fails, the script prints steps to remedy the failed step.
Once the script succeeds, it will provide the URL for your dashboard.

Updating Your Repository

  • To pull in new updates and features from the original repo, use GitHub's Sync fork button on your fork's main branch.
  • Activity data is stored on a dedicated dashboard-data branch and deployed from there
  • main is intentionally kept free of generated data/ and site/data.json artifacts so fork sync process stays cleaner.
  • After syncing, manually run Sync Heatmaps if you want your dashboard refreshed immediately. Otherwise updates will deploy at the next scheduled run.

Switching Sources Later

You can switch between strava and garmin any time.

  • Re-run ./scripts/bootstrap.sh and choose a different source.
  • If you re-run setup and choose the same source, setup asks whether to force a one-time full backfill for that run.

Configuration (Optional)

Everything in this section is optional. Defaults work without changes. Base settings live in config.yaml, and config.local.yaml overrides them when present.

Auth + source settings:

  • source (strava or garmin)
  • strava.client_id, strava.client_secret, strava.refresh_token
  • garmin.token_store_b64, garmin.email, garmin.password
  • garmin.strict_token_only (when true, Garmin sync requires garmin.token_store_b64 and does not fall back to email/password auth)

Sync scope + backfill behavior:

  • sync.start_date (optional YYYY-MM-DD lower bound for history)
  • sync.lookback_years (optional rolling lower bound; used only when sync.start_date is unset)
  • sync.recent_days (sync recent activities even while backfilling)
  • sync.resume_backfill (persist cursor so backfills continue across scheduled runs)
  • sync.per_page (page size used when fetching provider activities; default 200)
  • sync.prune_deleted (remove local activities no longer returned by the provider; pruning only happens on runs that perform a full backfill scan)

Activity type behavior:

  • activities.types (featured order in UI, and acts as allowlist when activities.include_all_types is false)
  • activities.include_all_types (when true, include all seen sport types; when false, include only activities.types)
  • activities.exclude_types (explicit type exclusions, even when include_all_types is true)
  • activities.type_aliases (map raw provider type names to canonical type names before grouping/filtering)
  • activities.group_aliases (map canonical type names to explicit grouped labels)
  • activities.group_other_types (when true, non-featured types are grouped into broader buckets; repo default is false)
  • activities.other_bucket (fallback group name when grouped type matching has no hit)

Display + rate-limit settings:

  • units.distance (mi or km)
  • units.elevation (ft or m)
  • heatmaps.week_start (sunday or monday)
  • rate_limits.* (Strava API pacing caps used by sync; ignored for Garmin)

Notes

  • Raw activities are stored locally for processing but are not committed (activities/raw/ is ignored). This prevents publishing detailed per-activity payloads and GPS location traces.
  • If neither sync.start_date nor sync.lookback_years is set, the sync workflow backfills all available history from the selected source (i.e. Strava/Garmin).
  • Strava backfill state is stored in data/backfill_state_strava.json; Garmin backfill state is stored in data/backfill_state_garmin.json. If a backfill hits API limits (unlikely), this state allows the daily refresh automation to pick back up where it left off.
  • The Sync action workflow includes a toggle labeled Reset backfill cursor and re-fetch full history for the selected source which forces a one-time full backfill. This is useful if you add/delete/modify activities which have already been loaded.
  • The GitHub Pages site is optimized for responsive desktop/mobile viewing.
  • If a day contains multiple activity types, that day’s colored square is split into equal segments — one per unique activity type on that day.

About

Turn your Strava and Garmin activities into GitHub-style contribution heatmaps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 60.2%
  • JavaScript 24.4%
  • HTML 10.1%
  • Shell 5.3%