initial commit

This commit is contained in:
wea_ondara
2024-04-17 18:58:50 +02:00
commit 41d5b4f591
22 changed files with 1611 additions and 0 deletions

22
utils/pickle2json.py Normal file
View File

@@ -0,0 +1,22 @@
import json
import pickle
import sys
files = sys.argv[1:]
print(files)
for pickle_filename in files:
if not pickle_filename.endswith('.pickle'):
print(pickle_filename + ' is not a pickle. ignoring')
continue
with open(pickle_filename, 'rb') as file:
obj = pickle.load(file)
print(obj)
json_filename = pickle_filename[0:-6] + 'json'
try:
with open(json_filename, 'w') as file:
json.dump(obj, file)
except Exception as e:
print(e)