Process & publish aggregate download stats
We collect aggregate counts on package downloads, and GitHub collects them for asset downloads. No good reason not to publish this data as a static HTML report somewhere; monthly aggregates above a minimal threshold should be safe to publish, and that'll make it easier to work with & reason about both for us and outside contributors.
(Data like this can help inform prioritization decisions, e.g., regarding distribution strategies.)
Just got the total number of downloads for year 2024 (so far), with this command and jq filters:
Total asset downloads for a specific year:
curl "https://api.github.com/repos/freedomofpress/dangerzone/releases?per_page=100" | jq '[.[] | select(.published_at | startswith("2024-")) | .assets[].download_count] | add'
15008
Also, split up by file extension:
curl "https://api.github.com/repos/freedomofpress/dangerzone/releases?per_page=100" | jq '
[
.[] |
select(.published_at | startswith("2024-")) |
.assets[] |
{
extension: (.name | split(".") | last),
downloads: .download_count
}
] |
group_by(.extension) |
map({
extension: .[0].extension,
total_downloads: map(.downloads) | add
})
'
[
{
"extension": "asc",
"total_downloads": 118
},
{
"extension": "dmg",
"total_downloads": 6299
},
{
"extension": "gz",
"total_downloads": 1235
},
{
"extension": "msi",
"total_downloads": 7301
},
{
"extension": "txt",
"total_downloads": 54
}
]
I put something together available at https://dz-stats.notmyidea.org/ for now. I probably should publish the code somewhere so that it builds inside a CI job periodically. What's the best course of action for this @eloquence?
Should I open a new repo?
We now have https://stats.dangerzone.rocks. It doesn't count the .deb / .rpm downloads, but that's good enough for now. Closing.