Add program to list badges
This commit is contained in:
parent
98d3deb401
commit
d4782dab33
|
@ -0,0 +1,12 @@
|
|||
import json
|
||||
from collections import Counter
|
||||
|
||||
with open("badges.json") as f: badges = json.load(f)
|
||||
|
||||
for k in badges:
|
||||
if k.startswith("__"): continue
|
||||
l = []
|
||||
counter = Counter([b["name"] for b in badges[k]])
|
||||
for item in counter.items():
|
||||
l.append("{} (x{!s})".format(*item))
|
||||
print("{}: {}".format(k,", ".join(l)))
|
Loading…
Reference in New Issue