Created
August 17, 2014 19:47
-
-
Save Tantas/8e44e1be98009ad49131 to your computer and use it in GitHub Desktop.
Get public repository list from GitHub.
This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
Get public repository list from github. Must modify the user name in the script. | |
""" | |
import json | |
import urllib2 | |
# Determine the github api call for the repository list | |
user = "user_name" | |
repo_list_url = "https://api.github.com/users/%s/repos" % user | |
# Download the repository list in json format and convert to an object | |
repository_list_json_raw = urllib2.urlopen(repo_list_url) | |
repository_list_json = json.load(repository_list_json_raw) | |
# Output the clone urls of the repositories | |
for repository in repository_list_json: | |
print repository["clone_url"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment