boardgame-menu/scripts/mechanics.py
2022-05-25 01:44:45 -07:00

16 lines
336 B
Python

import json
from collections import Counter
from pathlib import Path
DATA_PATH = Path(__file__).parent.parent.joinpath("data.json").resolve()
if __name__ == "__main__":
with open(DATA_PATH, 'r') as infile:
data = json.load(infile)
c = Counter()
for game in data:
c.update(game['mechanics'])
print(c)