Last active
November 11, 2019 11:12
-
-
Save jamesshah/66a3a1a40ab3cf4228be420ee19124fc to your computer and use it in GitHub Desktop.
Automation Of Project Initialization Using (Python + Shell Script)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
from github import Github | |
path = "/path/to/your/desired/projects/directory" | |
def create(): | |
folder_name = str(sys.argv[1]) | |
os.makedirs(path+folder_name) | |
username = #your github username | |
password = #your github password/ssh key. | |
user = Github(username,password).get_user() | |
repo = user.create_repo(folder_name) | |
print(f"New Repository '{folder_name}' created successfully.") | |
if __name__ == "__main__": | |
create() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment