Created
June 7, 2017 16:59
-
-
Save edsu/db2267a220d2e48b85f8e2e3edf12b9c to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python3 | |
""" | |
Print out all your gists. In case you want to search them. | |
""" | |
import json | |
from urllib.request import urlopen | |
url = "https://api.github.com/users/edsu/gists?page=%i" | |
page = 0 | |
while True: | |
page += 1 | |
found = False | |
for gist in json.load(urlopen(url % page)): | |
found = True | |
print(gist["html_url"]) | |
print(gist["description"]) | |
print("files: " + "".join([f for f in gist["files"].keys()])) | |
print() | |
if not found: break | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment