From 02f462877951e1a847d8288da39ef4e2e5810f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Sun, 12 Jul 2026 01:30:34 +0200 Subject: [PATCH] stats: self-host stargazers chart (starchart.cc broke on GitHub API restriction) GitHub now restricts the stargazers API to a repo's admins/collaborators (github.blog/changelog/2026-06-30-...), so the third-party starchart.cc embed on /stats/ no longer renders. We already track star counts in ActivityWatch/stats (data/stats.csv, every 6h, complete history from 0 in 2016 to ~18k today), so render the chart ourselves via analyze_stats.py --column stars, matching the other stats images. Removes the external dependency entirely; links to the GitHub stargazers page instead of starchart.cc. --- Makefile | 1 + stats.pug | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c9ffc678b..22ab1babb 100644 --- a/Makefile +++ b/Makefile @@ -64,6 +64,7 @@ img/stats: stats mkdir -p img/stats mkdir -p stats/out cd stats && poetry run python analyze_stats.py --since 2017-07-01 --column downloads --per-week --save ../img/stats/downloads.png + cd stats && poetry run python analyze_stats.py --since 2017-07-01 --column stars --title 'GitHub Stargazers' --save ../img/stats/stars.png cd stats && poetry run python analyze_stats.py --since 2017-07-01 --column 'Chrome WAU' --title 'Chrome Weekly Active Users' --save ../img/stats/chrome-wau.png cd stats && poetry run python analyze_stats.py --since 2017-07-01 --column 'Firefox DAU' --resample 7D --title 'Firefox Daily Active Users (7D mean)' --save ../img/stats/firefox-dau-7d.png cd stats && poetry run python analyze_stats.py --since 2017-07-01 --column 'Android installed devices' --title 'Android Installed Devices' --save ../img/stats/android-devices.png diff --git a/stats.pug b/stats.pug index 84ea6c9b6..607f748ad 100644 --- a/stats.pug +++ b/stats.pug @@ -64,10 +64,10 @@ div.text-center p | How many people have starred the ActivityWatch repository on GitHub div.img-center - a(href="https://starchart.cc/ActivityWatch/activitywatch") - img.width-700(title="Stargazers over time" src="https://starchart.cc/ActivityWatch/activitywatch.svg") + a(href="https://github.com/ActivityWatch/activitywatch/stargazers") + img.width-700(title="Stargazers over time" src="/img/stats/stars.png") div.small.dim - | Provided by starchart.cc + | Tracked in ActivityWatch/stats, updated every 6h hr.my-5