Github History Vandalism bash automated
Text decorate your github account's commit history calendar by (blatantly) abusing git's ability to accept commits in the past, and in effect, creating a text-based graffiti.
Pokrovsky is a web service that provides web API to generate a bash file that can be ran locally. It owes a lot from Gitfiti.
- With gitfiti, it's python dependent, and you have to type your credentials each generate of the graffiti.
- With Pokrovsky, it's much easier, but it does not (same with gitfiti) create and delete github repositories.
Automation - where both of them ends, this script continues on.
- You supply your github credentials.
- This will pull Auth Token via github dev API with permission to create
- This creates a repository in your github account, as well as deletes it when you generate new graffiti.
- This uses Pokrovsky web service. I opt to use this service vs using the original gitfiti.
After you vandalised your github history using either of the abovementioned, you will soon realize that as days and weeks pass by, the
graffiti is cut off at the left part of it - because it's moving to the left direction, as it is crafted in commits history and history is growing old as time and days pass by.
To update the graffiti, you need to delete the repository, and create a new one, and generate new commits containing dates that form the new
This script automates it with a
config.info file that is ignored in git's
.gitignore file. So you should not bother yourself with this file.
Unfortunately, I was not able to write pure bash to handle the automation. This shell script uses the following, as dependency:
- jq - is a lightweight and flexible command-line JSON processor. For installation, go to their website's download page.
How to use
- Clone this repository
git clone --depth=1 https://github.com/timhtheos/ghvandalism.git cd ghvandalism
install.shfile with 1 argument
bash install.sh <arg1>
<arg1> shall be the text to convert into graffiti, e.g.
bash install.sh ILOVEU
That's all you need to generate a text graffiti into your github public profile.
But, you may want to read further for your information.
The text shall not exceed 6 characters. If you provide more than 6 characters, it won't throw an error, but all characters after the 6th character won't appear in the graffiti.
If you provide 2 words, such as
@ 2015, have them double quoted, e.g. "@ 2015". Also please note that a space
Notice: The first time you run install.sh, it will do the following:
2.1 It will ask you to input your github username, password, and repository.
The `username` shall be the one from the URL of your github profile, not the email address associated to your account. The repository, may not exist. But it is recommended that you provide a repositoy that does not exist yet. install.sh will delete existing repositories and replace it with an empty one. If you happen to set an existing important repository, it will be deleted, and it cannot be undone. This prompt (asking for github credentials) happens once. Shold you decide to reset, just delete your `config.info` file.
2.2 It will create a config.info file and write in it the information you entered above.
2.3 It will generate github auth token, and set an initial auth_note_suffix to 0. In case auth_token failed, it will return
install.sh will re-run itself, also passing the first argument used. It will continue to re-run until auth_token is generated. Each re-run, auth_note_suffix is incremented.
- (OPTIONAL) Make sure that your install.sh file is executable
chmod u+x install.sh
This has actually been committed in 66c42b66c0eeeacfbb4632b4966b052191527b5e, but just to make sure.
- To change the text graffiti, just do step 2 again.
Todos and Improvements
I shall catch curl error when it time's-out. Among others.