ProjectInitializationAutomation icon indicating copy to clipboard operation
ProjectInitializationAutomation copied to clipboard

Update to Run Fully Create.py

Open ctv99 opened this issue 5 years ago • 1 comments

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()

ctv99 avatar Jul 09 '19 02:07 ctv99

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

terminal-guy avatar Aug 12 '20 06:08 terminal-guy