GitHub calendars as a service, built in Go. Scrapes a GitHub profile for the pretty commit calendar, converts it from an SVG to classed divs, caches it to Redis, and serves it up in a JSON response.
Install Redis and Go. Ensure Redis is running.
go get
this repository.- Edit
config.toml
with your preferred settings. go build
and run the binary.
GET /
: Retrieves GitHub calendar.
?columns=<column count>
: Only returns specified column count. Must be a number between 0 and 53.
fetch('<COMMITSCRAPE URL>/?columns=<OPTIONAL AMOUNT OF COLUMNS>')
.then(response => {
return response.json()
})
.then(res => {
document.querySelector('#commits').innerHTML = res.html
})
.commitscrape-0 { background-color: 'some color for no commits' }
.commitscrape-1 { background-color: 'some color for light commits' }
.commitscrape-2 { background-color: 'some color for medium commits' }
.commitscrape-3 { background-color: 'some color for a lot of commits' }