Contriseg allows anyone to generate animations with their github contributions charts with an extreme ease.
- Install
go - Clone or download this repo:
git clone git@github.com:dimaglushkov/contriseg.git- Generate your GitHub Access Token with only
read:userprivileges - Create your
.envfile from the.env.examplewith the following content:
GITHUB_USERNAME=<target user>
GITHUB_TOKEN=<previously generated token>
TARGET_LOCATION=<output file location>
ANIMATION=<animation type ()predefined: bfs, cbc, move)>- Download dependencies, build, and run the application:
go run .Since a generated GIF could be big and take too long to be downloaded, you can compress it using amazing gifsicle.
To do that just run
./bin/compress.shTo create a new animation you only need to do two things:
- Implement function of type
type Iterator func(cal internal.Calendar) []internal.Calendarwhich should return a list of continuously changing Calendar (it's basically frames for Calendar).
Check out anim.go to see predefined animations.
- After animation is completed, insert it's alias and name to iterationsMap
var animationsMap = map[string]AnimationIterator{
"bfs": CalendarBFSIterations,
"move": CalendarMoveColLeftIterations,
"cbc": CalendarColByColIterations,
"your_alias": YourAnimationFunction
}That's it, now you can use your own animation by just editing .env file and changing ANIMATION value to the alias of the recently created animation


