Created
March 30, 2016 21:04
-
-
Save pyfisch/a535fec885dd4efb2f77b4c4fd6ebd3b 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
| import json, sys, os | |
| for r, d, f in os.walk('.'): | |
| if r.startswith('./.git') or r == '.': | |
| continue | |
| for filename in f: | |
| with open(os.path.join(r, filename)) as file: | |
| last = file.readlines()[-1] | |
| deps = json.loads(last)['deps'] | |
| star_deps = [] | |
| for dep in deps: | |
| if dep['req'] == '*': | |
| star_deps.append(dep['name']) | |
| if star_deps: | |
| print(filename, end=' -> ') | |
| print(star_deps[0], end='') | |
| for dep in star_deps[1:]: | |
| print(', ' + dep, end='') | |
| print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment