GodsDevProject's picture
Rename icij.py to collaboration/icij.py
c9a10b2 verified
raw
history blame contribute delete
456 Bytes
from typing import List, Dict
import json
import uuid
def export_icij_bundle(results: List[Dict]) -> str:
bundle = {
"bundle_id": str(uuid.uuid4()),
"documents": results,
"schema": "ICIJ Investigative Dataset v1",
"notes": "For collaborative investigative journalism"
}
path = f"/tmp/icij_bundle_{bundle['bundle_id']}.json"
with open(path, "w") as f:
json.dump(bundle, f, indent=2)
return path