Created
November 16, 2019 16:24
-
-
Save jbeezley/42f77a3c74ac6fe4c698dc4a433015a1 to your computer and use it in GitHub Desktop.
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 | |
import json | |
import sys | |
def main(ids): | |
if not len(ids): | |
print('Usage: %s id [id [id ...] ]' % sys.argv[0]) | |
sys.exit(1) | |
try: | |
with open('all-activities.json', 'r') as f: | |
map = json.load(f) | |
except Exception: | |
url = 'https://gist.github.com/jbeezley/cf987e4152167bbf888910e60803037a' | |
print('Download the activity list from ' + url) | |
raise | |
for id in ids: | |
if id not in map: | |
print('Could not find %s' % id) | |
else: | |
print(map[id]) | |
if __name__ == '__main__': | |
main(sys.argv[1:]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment