14 lines
437 B
Python
14 lines
437 B
Python
import glob
|
|
import json
|
|
|
|
files = sorted(glob.glob('import/*.json'))
|
|
print(f"Total JSON files in import: {len(files)}")
|
|
for f in files:
|
|
with open(f, 'r', encoding='utf-8') as fp:
|
|
data = json.load(fp)
|
|
p_id = data.get("id")
|
|
p_title = data.get("title")
|
|
m_count = len(data.get("missions", []))
|
|
req_hours = data.get("requiredHours")
|
|
print(f"[{p_id}] {f}: {p_title} | Missions: {m_count} | Hours: {req_hours}h")
|