swdata/island/matches.py
2018-03-11 17:16:26 +08:00

14 lines
353 B
Python

from pathlib import Path
from .match import Match
class Matches:
def __init__(self, logdir):
self.data = []
self.names = []
for file in Path(logdir).iterdir():
if Path(file).suffix == '.json':
self.data.append(Match.read_from_json(str(file)))
self.names.append(Path(file).stem)