Skip to content

Commit ee1ceb0

Browse files
committed
feat: added more stats, improved contributor-stats page
1 parent 8f13574 commit ee1ceb0

File tree

5 files changed

+70
-13
lines changed

5 files changed

+70
-13
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,7 @@ _includes/tables: contributor-stats
5050
img/stats: stats
5151
cd stats && poetry install
5252
mkdir -p img/stats
53-
cd stats && mkdir -p out && poetry run python analyze_stats.py --since 2017-07-01 --column downloads --save ../img/stats/downloads.png
53+
mkdir -p stats/out
54+
cd stats && poetry run python analyze_stats.py --since 2017-07-01 --column downloads --per-day --save ../img/stats/downloads.png
55+
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
56+
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

_includes/header.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ html
3232
.dropdown-menu(aria-labelledby='navbarDropdown')
3333
a.dropdown-item.text-secondary.font-weight-bold(href='/stats/')
3434
i.fa.fa-download.mr-2
35-
| Downloads
35+
| Downloads & Users
3636
a.dropdown-item.text-secondary.font-weight-bold(href='/contributors/')
3737
i.fa.fa-users.mr-2
3838
| Contributors

_sass/_base.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,22 @@ pre {
225225
}
226226
}
227227
}
228+
229+
// Details & summary styling
230+
details {
231+
margin-bottom: 0.5em;
232+
}
233+
details > summary {
234+
background-color: $grey-color-light;
235+
cursor: pointer;
236+
padding: .25rem 1rem;
237+
}
238+
239+
details > summary > * {
240+
display: inline-block;
241+
}
242+
243+
details {
244+
border: 2px solid $grey-color-light;
245+
margin-top: 0;
246+
}

contributors.html

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,39 @@
55
---
66

77
<p>
8-
Here you can see some statistics of all our hard working contributors. The list is updated every 24 hours.
8+
Here you can see some statistics of all our hard working contributors.
99
</p>
1010

1111
<p>
1212
<a href="https://github.com/ActivityWatch/activitywatch/blob/master/CONTRIBUTING.md">Contribute yourself</a> to get your name on this page!
1313
</p>
1414

15+
<p>
16+
The list is updated every 24 hours.
17+
</p>
18+
19+
<br>
1520
<h3>Visualization</h3>
1621
<p>
1722
Here we have a have a visualization of development history:
1823
</p>
1924
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/zjIn43lZq3U" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
2025

26+
<p>
27+
The script used to generate the video can be found <a href="https://github.com/ActivityWatch/contributor-stats/tree/master/video">here</a>.
28+
</p>
29+
30+
<br>
2131
<h3>Tables</h3>
32+
<p>
33+
Here we have tables of contribution statistics, both for across all repos and for each individual repo.
34+
The statistics are generated using the <a href="https://github.com/ActivityWatch/contributor-stats">contributor-stats</a> repository.
35+
</p>
36+
37+
<p>
38+
GitGitLog also provides a view of the stats <a href="https://gitgitlog.com/ActivityWatch">here</a>.
39+
</p>
40+
2241
<p>
2342
<small>
2443
<b>Note:</b>
@@ -28,27 +47,35 @@ <h3>Tables</h3>
2847
</small>
2948
</p>
3049

31-
<p>
32-
GitGitLog also provides a view of the stats <a href="https://gitgitlog.com/ActivityWatch">here</a>.
33-
</p>
34-
3550
{% assign modules = "total,aw-core,aw-server,aw-server-rust,aw-webui,aw-qt,aw-android,aw-client,aw-client-js,aw-client-rust,aw-watcher-window,aw-watcher-afk,aw-watcher-web,aw-watcher-vim,aw-watcher-vscode,docs,activitywatch.github.io,activitywatch" | split: ',' %}
3651

3752
<b>Table of contents</b>
3853
<ul>
3954
{% for module in modules %}
40-
<li><a href="#{{ module }}">{{ module }}</a>
55+
<li><a href="#{{ module }}">{{ module }}</a></li>
4156
{% endfor %}
4257
</ul>
4358

4459
<div class="contributor-stats">
4560
{% for module in modules %}
46-
<a {% if module != "total" %} href="https://github.com/activitywatch/{{ module }}" {% endif %}>
47-
<h3 id={{ module }}>{{ module }}</h3>
48-
</a>
61+
{% if module != "total" %}
62+
<details>
63+
<summary>
64+
{% endif %}
65+
<h4 id={{ module }}>{{ module }}</h4>
66+
{% if module != "total" %}
67+
</summary>
68+
{% endif %}
4969

5070
{% assign table_filename = "tables/" | append: module %}
5171
{% include {{ table_filename }}.html %}
72+
73+
{% if module != "total" %}
74+
<div class="small px-2 pb-2" >
75+
You can also see these stats <a href="https://github.com/activitywatch/{{ module }}/graphs/contributors">on GitHub</a>.
76+
</div>
77+
</details>
78+
{% endif %}
5279
{% endfor %}
5380
</div>
5481

stats.pug

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@ permalink: /stats/
77
// Bullshit to get the page to render: https://github.com/DougBeney/jekyll-pug/issues/19#issuecomment-1131441149
88
| {% if 1 %}{% endif %}
99

10-
h2 Downloads
10+
h3 Downloads
1111
p
1212
| Here you can see some download statistics, updated every 24h.
1313
img(src="/img/stats/downloads.png" width="100%")
1414

1515
hr
1616

17-
h2 Stargazers over time
17+
h3 Active users
18+
p
19+
| How many people are using the aw-watcher-web extension in Chrome or Firefox.
20+
img(src="/img/stats/chrome-wau.png" width="100%")
21+
img(src="/img/stats/firefox-dau-7d.png" width="100%")
22+
23+
hr
24+
25+
h3 Stargazers over time
1826
a(href="https://starchart.cc/ActivityWatch/activitywatch")
1927
img(title="Stargazers over time" src="https://starchart.cc/ActivityWatch/activitywatch.svg" width="100%")

0 commit comments

Comments
 (0)