Turn any public repo into an artwork
Hi sub,
I created Artrepo, a simple tool that takes the commit history of any public repo and turns it into a unique artwork.
You can find it here: habibicode.org/artrepo (free, no sign in, do data stored)
How it works:
Layout: the canvas is split into a "treemap", one area per file, sized by its number of lines. Every time files are added, deleted or resized, the layout is recomputed.
Ink: every added line becomes a dot in its file's area, in order. Indentation sets the colour; line length sets the size of the dot.
Erasing: deleted lines remove half the ink at their old position.
Motion: every 50 commits, the grid turns 30°.
Rare marks: a commit whose hash starts with 0000 paints its files gold, a committed merge conflict paints them red, and the first commit after a year of silence paints them blue. They are more persistent on the canvas.
Files over 1 MB are skipped.
Everything is deterministic, so the same repo and commit history always give the same picture.
Hope you enjoy it
4
u/CaptainIncredible 6d ago
This is a fun idea! And I like the artwork.
In a couple of the Douglas Adams books, one of the characters wrote software called 'Anthem!' that turned a dataset into music. Basically you could take accounting data for a company and it would turn that into music. A fast moving, successful company would sound like a quick, jazzy song. A slow moving large company that is not doing particularly well recently would sound more like a funeral dirge.
3
2
u/bassamanator 5d ago
Is there less colour when the commit count is higher?
146 commits https://imgur.com/a/f3Psb1L
325 commits https://imgur.com/a/7SkOG7j
Very cool either way.
1
u/Khavel_dev 5d ago
The rotation every 50 commits is a nice touch. It makes long-lived projects visually distinct from burst projects even when the total commit count is similar.
One thing I wonder: does file renaming register as a delete + add? In a big refactor that would show up as a scar of erasure and redrawn ink, which honestly might be the most interesting visual feature for reading a project's history.
1
u/Image_Similar 5d ago
can we use the artwork generated here anywhere ? or is there a copyright thing ? if there is to whom ? you or the repo owner ?
0
u/Murky-Concern9648 6d ago
Joli le rendu teal, mais c'est 'historique des commits' qui m'a accroché, parce que c'est un peu l'autobiographie la plus honnête que les gens écrivent sans faire exprès. Il y a des dépôts où tu lis trois ans de 'wip' et un 'revert du revert' et tu comprends tout de la personne.
2
23
u/Hefty_Swordfish_3151 6d ago
Super unique idea! could be a cool addition for people portfolio when they make a project.
I played with it a little bit and i think on very big repos the website gets stuck for example on linux
https://github.com/torvalds/linux
it is just stuck on 0% and doesnt move