├── LICENSE ├── commitbot.py └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Devansh Shukla 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /commitbot.py: -------------------------------------------------------------------------------- 1 | """ 2 | Add progressbar2 and also make the function more modular. 3 | Add tkinter gui as well and add date time change options. 4 | Add descriptions on commandline and package the entire thing 5 | Lets see where we can take this. 6 | P.S. Made by Devansh. 7 | """ 8 | from time import sleep 9 | import os 10 | 11 | count=1 12 | 13 | def update(): 14 | if 'a.txt' in os.listdir(): 15 | os.system('rename a.txt b.txt') #Renames file 16 | elif 'b.txt' in os.listdir(): 17 | os.system('rename b.txt a.txt') #Renames file 18 | else: 19 | listdir=os.listdir() 20 | for list in listdir: 21 | if list != '.git': 22 | os.system('del '+ list) 23 | os.system('type nul > a.txt') 24 | 25 | 26 | def pull(repo,url): 27 | if os.path.exists(repo)==False: 28 | os.system('git clone ' + url) 29 | dirname = os.path.dirname(__file__) 30 | filename = os.path.join(dirname, ''+repo) 31 | os.chdir(filename) 32 | 33 | def push(): 34 | global count 35 | os.system('cd') 36 | os.system('git add . && git commit -m "commit ' + str(count) + '"') 37 | os.system('git push origin master') 38 | count+=1 39 | 40 | def main(): 41 | repo=input("Enter Git Repository name: ") 42 | url = input("Enter Git Repository URL: ") 43 | comm=int(input("Enter Number Of Commits To Perform: ")) 44 | pull(repo,url) 45 | for i in range(0,comm): 46 | update() 47 | push() 48 | 49 | 50 | if __name__=='__main__': 51 | main() 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Git-commit-bot for Windows 2 | A git commit generator that can commit repositories to boost your profile contributions. 3 | 4 | ![alt text](https://i.imgur.com/TYxWo2q.png) 5 | 6 | It is a fairly simple and efficient script that works by renaming a single empty text file and commiting the changes. Feel free to test it for yourself. 7 | 8 | ## Requirements: 9 | - Windows Commandline 10 | - Python3 11 | 12 | 13 | ## How To Install: 14 | To run the script type the following commands in CMD: 15 | ``` 16 | git clone https://github.com/devanshds/Git-commit-bot.git 17 | ``` 18 | ``` 19 | cd Git-commit-bot 20 | ``` 21 | ``` 22 | python commitbot.py 23 | ``` 24 | The script will be executed. 25 | ![alt text](https://i.imgur.com/L2MvLU2.png) 26 | 27 | ## Usage: 28 | The script needs two parameters to run correctly: Repository name & Repository URL 29 | - Create an empty repository beforehand without README.md . 30 | - Make sure the repository name is the same as the empty repository you created before running the script. 31 | - You may be asked for username and password. 32 | - And within minutes you will have more commits than you had before. 33 | 34 | The repository will come out looking like this so might wanna make it private 35 | 36 | ![alt text](https://i.imgur.com/JiqjXYf.png) 37 | 38 | ## Notes: 39 | - I made this purely for learning purposes and out of curiosity. 40 | - You can extend its functionality to linux if you have experience with shell. 41 | - For the curious souls, I myself, am not using this. 42 | --------------------------------------------------------------------------------