Skip to content

Instantly share code, notes, and snippets.

@catfact
Created January 25, 2021 17:26
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catfact/5521e15a66bc39474782f8751319460f to your computer and use it in GitHub Desktop.
Save catfact/5521e15a66bc39474782f8751319460f to your computer and use it in GitHub Desktop.
import requests
import subprocess
community_url = "https://raw.githubusercontent.com/monome/norns-community/main/community.json"
def clone_all(url, location):
res = requests.get(url)
cat = res.json()
for entry in cat['entries']:
proj_url = entry['project_url']
cmd = f'git clone {proj_url}'
print(cmd)
process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, cwd=location)
output, error = process.communicate()
print(output)
print(error)
clone_all(community_url, "/home/emb/norns-all-scripts")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment