shuhanmirza / github-contribution-pixel-art

๐Ÿ”  Script to write in your Github contribition graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

github-contribution-pixel-art

Simple Javascript solution to write in your GitHub contribution graph.

Getting Started

  • install latest node/npm
  • install required dependencies with npm
  • update variables according to your need in pusher.js
const START_DATE_STRING = "2016-02-14"; // from the point the art will start from. the upper left pixel of contribution graph
const STRING = "hi" // Input what you want to print here
  • run pusher.js
 $ node pusher.js  
  • push the commits
$ git push
  • checkout your contribution graph

img.png

How it works

The binary maps of the letters are kept in letterHexList in hexadecimal format. It was prepared using LED Matrix Editor. However, these hex values are for 8x8 matrix displays. Later, it was trimmed into 7x7 matrices hex values. After that, the 7x7 matrices are rotated to get it prepared to print in the contribution graph.

Why 7x7 matrix

The contribution graph's height is 7 pixels.

How 'printing' works

To get a lit pixel, the code pushes 20 commits for that specific pixel. A pixel is identified by a date.

How commits are made

The script appends X in data.txt and commits the change.

Acknowledgments

About

๐Ÿ”  Script to write in your Github contribition graph


Languages

Language:JavaScript 100.0%