Skip to content

Tankolom-X/CommitDraw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commit Draw

Allows you to convert your image into the activity on your GitHub heatmap, as well as fill it randomly

CommitDraw is a tool to decorate your GitHub contribution heatmap based on the git's ability to accept commits in the past.


Modes of use:

Image convert

The image that was provided:
example
From left to right: turtle, hedgehog, mushroom, smile, penguin

The result:
result

Fill randomly

The result:
result
On the left side of the image settings of random filling are not specified, on the right are specified


How does it work?

Image convert

CommitDraw analyzes a picture that you provide to the program, then generates an array of commits. After all it starts to draw by making commits from the date you have chosen.

Warning If your beginning date is not Sunday, the program will pass pixels from the Sunday to the date you have chosen

Note A picture that you provide to the program should be 7 pixels in height.
Otherwise, the result may be blurred.

Fill randomly

CommitDraw makes commits for the period you selected, in amount of randomly selected value from the generated array (you can specify it yourself, or only specify the minimum and maximum values).It can also exclude days of the week that you have chosen.


In the result:
1. Commits will be generated which you can push to the GitHub repository
2.You will get the same image in the selected folder on your PC as when you push the commits to the GitHub

Generated image in the selected folder on your PC:
generated image


How to use?

  1. You can download and launch built program for your os

    windows

    apple

    linux

    Download Download Download

    Or run from source following the instructions:

    • Execute git clone https://github.com/Tankolom-X/CommitDraw.git
    • Make sure you have an actual version of pip:
    pip install --upgrade pip 
    • Then install required dependencies: Pillow, GitPython and tkinter:
    pip install -r requirements.txt 

    Note Linux and Mac users may be forced to install tkinter via their distribution's package managers

    • Run main.py
    python main.py
  2. In the menu select the activity you want to do

    • Convert an image to your GitHub heatmap activity
    • Fill you GitHub heatmap activity randomly

    Note For the best result the picture should be 7 pixels in height
    The date must be in YYYY-MM-DD format

  3. Follow the prompts

    💡 Learn more about customizing random filling
    Learn more about selecting an image for the image conversion

  4. Wait until the program will finish and close

  5. In GitHub create a new repository

  6. Push the repository on your PC with commits from the command line to the GitHub's repository using:

    git remote add origin https://github.com/[username]/[repositoryName]
    
    git branch -M main
    
    git push -u origin main
    
  7. Wait. GitHub will update your contribution heatmap soon

    Warning The years you used to draw cannot be removed from the activity on GitHub


Selecting the picture

Your picture should be 7 pixels in height. Otherwise, the result may be blurred.

White color means no activity(Empty cell on your GitHub heatmap).
The darker the color of your image the darker the color of the cell on your GitHub heatmap.

Examples you can find here: https://github.com/Tankolom-X/CommitDraw/tree/1.x/samples


Customizing the random filling

Exclude days of the week

To do it, on question:
To exclude days of the week from your activity, insert "Y"
(press enter to skip)
You should insert Y

You should insert only one line with numbers of days separated by a whitespace

Day Number
Sunday 0
Monday 1
Tuesday 2
Wednesday 3
Thursday 4
Friday 5
Saturday 6

Example: 0 6
This means exclude Sunday and Saturday from the random filling

Settings of the filling

To specify the random filling in the program on question:
To specify the random filling, insert "Y"
(press enter to skip)
You should insert Y

After that you should insert only one line with commands separated by a whitespace

For each day the program will randomly choose a number of commits from the array, generated by these settings

Command Description
number*frequency This means that this "number" of commits
will appear with some "frequency"
number1-number2 This means numbers in range from "number1" to "number2"
number This means that "number" of commits

From these commands will be generated an array with numbers, from which will be selected an amount of commits for each day

Example: 1*2 2-4 7
1*2 - means 1 commit will appear with frequency 2
2-4 - means numbers from 2 to 4
7 - means number 7 in array

This example generates an array [1, 1, 2, 3, 4, 7]