UniTO/anno3/progmobile/backend/mozapp.server/mpd_dir/produce_imgs.py

14 lines
286 B
Python
Raw Normal View History

2020-06-16 19:25:06 +02:00
import json
import pickle
for location in ["artists", "covers"]:
alls = {}
with open("/home/user/.mpd/"+location+".pk", "rb") as f:
alls = pickle.load(f)
allj = json.dumps(alls)
with open("/home/user/.mpd/"+location+".json", "w") as f:
f.write(allj)