ProjectInitializationAutomation
ProjectInitializationAutomation copied to clipboard
Update to Run Fully Create.py
import sys import os from github import Github
path = "/home/cstevens/Documents/Code/"
username = "" #Insert your github username here password = "" #Insert your github password here password2 = "" #Insert your github web formated password here
def create(): folderName = str(sys.argv[1]) os.makedirs(path + str(sys.argv[1])) user = Github(username, password).get_user() repo = user.create_repo(sys.argv[1]) os. chdir(path + str(sys.argv[1])) with open("README.md", "w") as text_file: print("#Demo") os.system("git init") os.system("git add README.md") os.system("git commit -m 'first commit'") os.system("git remote add origin https://github.com/{0}/{1}.git".format(username,sys.argv[1])) os.system("git push https://{0}:{1}@github.com/{0}/{2}.git --all".format(username,password2,sys.argv[1])) print("Succesfully created repository {}".format(sys.argv[1]))
if name == "main": create()
I have created a same script as this to work on every machine
DO NOT WORRY THIS SCRIPT WORKS ON EVERY MACHINE
Link to the project: https://github.com/String-error-404/GIT-and-GTITHUB_automation
if you like the project give a star to the repo and follow me on github