Skip to content

Instantly share code, notes, and snippets.

@edsu
Created June 7, 2017 16:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsu/db2267a220d2e48b85f8e2e3edf12b9c to your computer and use it in GitHub Desktop.
Save edsu/db2267a220d2e48b85f8e2e3edf12b9c to your computer and use it in GitHub Desktop.
#!/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