Skip to content

Instantly share code, notes, and snippets.

@jamesshah
Last active November 11, 2019 11:12
Show Gist options
  • Save jamesshah/66a3a1a40ab3cf4228be420ee19124fc to your computer and use it in GitHub Desktop.
Save jamesshah/66a3a1a40ab3cf4228be420ee19124fc to your computer and use it in GitHub Desktop.
Automation Of Project Initialization Using (Python + Shell Script)
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