Data & MetricsFetch History
Fetch History
Paginates the full GitHub commit history into a time-series JSON file for animated art generation.
Module
scripts/fetch_history.py
Shared HTTP helpers live in scripts/_github_http.py.
What it fetches
A paginated list of commits across the default branch, returning each commit's:
sha— commit hashdate— ISO 8601 timestampmessage— first line of commit messageadditions/deletions— line change counts
Pagination uses a local _get(url, token) that returns (data, next_url) tuples and follows GitHub's Link: <...>; rel="next" headers until exhausted.
CLI
uv run python -m scripts.fetch_history \
--owner wyattowalsh \
--repo wyattowalsh \
--output /tmp/history.jsonAuthentication
Same as fetch_metrics — GITHUB_TOKEN env var:
export GITHUB_TOKEN=ghp_...Output shape
[
{
"sha": "abc123",
"date": "2026-03-17T12:00:00Z",
"message": "feat: add ink garden",
"additions": 200,
"deletions": 10
}
]Usage in animated art
The history JSON is passed directly to animated_art.py:
uv run python -m scripts.cli generate animated \
--history-path /tmp/history.jsonThe commit timestamps are used to compute daily activity density, which seeds the CSS animation parameters.