![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Functions | |
| format_of (name) | |
| get_json (url, token=None) | |
| github_releases (token) | |
| snapshot (token) | |
| append (series, snap) | |
| main () | |
Variables | |
| str | REPO = "aurelienpierreeng/ansel" |
| str | API = "https://api.github.com" |
| str | DOCKER_IMAGE = "aurelienpierre/ansel" |
| str | DOCKER_HUB = "https://hub.docker.com/v2/repositories" |
| MONTH_TAG_RE = re.compile(r"^nightly-(\d{4}-\d{2})$") | |
| list | FORMATS |
Download statistics for the nightly packages, as a daily series.
download_stats.py snapshot > today.json
download_stats.py append series.json today.json > series.json
GitHub keeps one lifetime `download_count` per release asset and nothing else -- delete
the asset (the monthly prune does, and so did moving August 2026 between releases) and
its count is gone. Docker Hub keeps one lifetime `pull_count` per repository. Neither is
a time series. This turns them into one: a snapshot of every counter, once a day, appended
to a list that only ever grows. Downloads *between* two dates are the difference of two
snapshots; the loss on deletion stops mattering once the day before is on record.
Every route a user takes ends up in these counters: the website's buttons, the in-app
"Update to the latest nightly build", the Homebrew cask and the Scoop manifest all
download the release asset, and AppImageUpdate fetches the .zsync and ranges of the
AppImage. Neither Homebrew nor Scoop has analytics for third-party taps; there is
nothing to add from their side.
The build month of an asset is read from its release tag (nightly-YYYY-MM) when the tag
carries one, and from the asset's creation date otherwise -- an asset moved between
releases is created anew, so its date is the day it was moved, not the night it was built.
| download_stats.append | ( | series, | |
| snap | |||
| ) |
One entry per date, the newest snapshot for a date winning; sorted by date. Clone traffic is a rolling 14-day window, so each snapshot's `traffic` is folded into the series' own by-date map (`series[-1]["traffic_by_day"]` carries it forward): a day seen in several snapshots keeps the last value, and days older than the window survive because they were recorded when they were inside it.
Definition at line 145 of file download_stats.py.
Referenced by main().
| download_stats.format_of | ( | name | ) |
Definition at line 69 of file download_stats.py.
Referenced by snapshot().
| download_stats.get_json | ( | url, | |
token = None |
|||
| ) |
Definition at line 76 of file download_stats.py.
Referenced by github_releases(), and snapshot().
| download_stats.github_releases | ( | token | ) |
| download_stats.main | ( | void | ) |
Definition at line 164 of file download_stats.py.
References append(), main(), and snapshot().
Referenced by main().
| download_stats.snapshot | ( | token | ) |
Definition at line 95 of file download_stats.py.
References format_of(), get_json(), and github_releases().
Referenced by main().
| str download_stats.API = "https://api.github.com" |
Definition at line 50 of file download_stats.py.
| str download_stats.DOCKER_HUB = "https://hub.docker.com/v2/repositories" |
Definition at line 52 of file download_stats.py.
| str download_stats.DOCKER_IMAGE = "aurelienpierre/ansel" |
Definition at line 51 of file download_stats.py.
| list download_stats.FORMATS |
Definition at line 58 of file download_stats.py.
Definition at line 53 of file download_stats.py.
| str download_stats.REPO = "aurelienpierreeng/ansel" |
Definition at line 49 of file download_stats.py.