Skip to content
All work

Case study · 03

Profile cards

A scheduled workflow that draws my GitHub profile's stats, languages and project cards.

Runs dailyGitHub Actions

06:17 UTC, plus every push
Daily
06:17 UTC, plus every push
third-party Python packages
0
third-party Python packages
themes, dark and light
2
themes, dark and light
SVG files per run
10
SVG files per run

The problem

The problem

My GitHub profile shows a stats card, my most-used languages and a card for each featured project. A script of mine draws them, and a scheduled workflow keeps them current.

How it works

From a schedule to the profile page.

GitHub Actions

  1. Schedule

    Daily at 06:17 UTC, on push, or by hand

  2. generate_cards.py

    One GraphQL query → SVG, dark and light

  3. Platane/snk

    Contribution snake, both themes

Publish

output branch, no history

GitHub profile

  1. Profile README

    <picture> picks dark or light

Every run replaces the output branch with a fresh set of cards.
  1. 01

    Fetch

    One query to GitHub's GraphQL API returns the profile's stats, languages and featured repos.

  2. 02

    Draw

    The script writes each SVG by hand: a stats card with streaks, a languages card, and one card each for SideScreen and osu!tab, in a dark and a light theme.

  3. 03

    Publish

    The workflow adds the contribution snake and publishes everything to an output branch, which the profile README points at.

Trade-offs

What each choice bought, and what it cost.

  • Python's standard library only

    GetsThe workflow has no pip install step: it sets up Python 3.13 and runs the script.

  • A separate output branch, with history off

    GetsGenerated files never land on main, and the output branch stays one commit.

  • A dark and a light version of every card

    GetsThe README's <picture> tags show the one that matches the viewer's GitHub theme.

Built with

Built with

  • Python
  • GraphQL
  • SVG
  • GitHub Actions

Every fact and number on this page comes from the profile repo's README, script and workflow.

Command palette

19 results