diff --git a/.my_commands.sh b/.my_commands.sh index 3844488..c4d7ff4 100644 --- a/.my_commands.sh +++ b/.my_commands.sh @@ -1,7 +1,7 @@ #!/bin/bash function create() { - cd + source .env python create.py $1 cd $FILEPATH$1 diff --git a/create.py b/create.py index 7a33ca5..39400b8 100644 --- a/create.py +++ b/create.py @@ -14,7 +14,8 @@ def create(): os.makedirs(path + str(folderName)) user = Github(username, password).get_user() repo = user.create_repo(folderName) - print("Succesfully created repository {}".format(folderName)) + # f strings + print(f"Succesfully created repository {folderName}") if __name__ == "__main__": create() diff --git a/remove.py b/remove.py index 6780127..144fd00 100644 --- a/remove.py +++ b/remove.py @@ -13,10 +13,10 @@ def remove(): browser.find_elements_by_xpath("//input[@name='login']")[0].send_keys(username) browser.find_elements_by_xpath("//input[@name='password']")[0].send_keys(password) browser.find_elements_by_xpath("//input[@name='commit']")[0].click() - browser.get('https://github.com/silv4b/' + reponame + '/settings') + browser.get('https://github.com/' + username + '/' + reponame + '/settings') browser.find_elements_by_xpath('//*[@id="options_bucket"]/div[9]/ul/li[4]/details/summary')[0].click() browser.find_elements_by_xpath( - '//*[@id="options_bucket"]/div[9]/ul/li[4]/details/details-dialog/div[3]/form/p/input')[0].send_keys(reponame) + '//*[@id="options_bucket"]/div[9]/ul/li[4]/details/details-dialog/div[3]/form/p/input')[0].send_keys(username + "/" + reponame) browser.find_elements_by_xpath( '//*[@id="options_bucket"]/div[9]/ul/li[4]/details/details-dialog/div[3]/form/button')[0].click() browser.get("https://github.com/" + username) diff --git a/windows_OS/README.md b/windows_OS/README.md index 4fef476..ab239ee 100644 --- a/windows_OS/README.md +++ b/windows_OS/README.md @@ -2,7 +2,7 @@ ``` create env vars : > projects directory as - "mp" -> Github tocken as - "gt" +> Github token as - "gt" ``` ### setup: diff --git a/windows_OS/remote.py b/windows_OS/remote.py index e842a0f..f5fad0f 100644 --- a/windows_OS/remote.py +++ b/windows_OS/remote.py @@ -27,7 +27,7 @@ os.system(c) print(f'{foldername} created locally') - os.system('code .') + os.system('code .') # add github token to the env vars else: print("create ")