Site
Gitweb
Static
projects
/
eros.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc24cea
)
Switch from Zstandard to bzip2
author
Jakob Cornell
<jakob+gpg@jcornell.net>
Sun, 10 Oct 2021 21:16:46 +0000
(16:16 -0500)
committer
Jakob Cornell
<jakob+gpg@jcornell.net>
Sun, 10 Oct 2021 21:16:46 +0000
(16:16 -0500)
python/scripts/ingest_ptp_json.py
patch
|
blob
|
history
diff --git
a/python/scripts/ingest_ptp_json.py
b/python/scripts/ingest_ptp_json.py
index 50771131ddfbc82a107b7697cd60b93a246270b9..3346c0c2b55568828b3572f76087e3198d071bec 100644
(file)
--- a/
python/scripts/ingest_ptp_json.py
+++ b/
python/scripts/ingest_ptp_json.py
@@
-1,11
+1,11
@@
import argparse
+import bz2
import contextlib
import json
import pathlib
import sys
import psycopg2
-import zstd
arg_parser = argparse.ArgumentParser()
@@
-61,7
+61,7
@@
with contextlib.closing(psycopg2.connect("")) as conn, conn.cursor() as cursor:
for p in paths:
with p.open("rb") as f:
- json_data =
zstd
.decompress(f.read()).decode("utf-8")
+ json_data =
bz2
.decompress(f.read()).decode("utf-8")
doc = json.loads(json_data)
group_count = len(doc["Movies"])