Draw a grid of data onto the Github contributions graph
git clone https://github.com/pikesley/gitpaint
cd gitpaint
bundle
bundle exec rake
bundle exec rake install
Gitpaint.configure do |config|
config.username = github_user
config.email = github_email
config.repo = github_repo
config.token = github_api_token
config.ssh_key = /path/to/ssh_key
end
/tmp/#{repo} and remotely at https://github.com/#{github_user}/#{repo} (and it will be mercilessly deleted from both places between runs)repo privileges and, crucially, the separate delete repo privilege#{github_user} accountdata = [
[3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3],
[3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3],
[2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 1, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3],
[2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 3, 3, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 1, 1, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 3, 2, 2, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 2, 2, 1, 0, 1, 1, 1, 0, 0, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1],
[2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
]
Gitpaint.paint data
There’s some slightly clunky code that will take a 52*7 greyscale PNG image and turn it into data suitable for Gitpaint. Use it like
pngr = Gitpaint::PNGRenderer.new 'image.png'
or
bundle exec rake image:decompose[image.png]
the pass that to Gitpaint.paint