LinkGet.py 287 B

123456789
  1. import json
  2. def trans(froms,key,dest):
  3. mapping = {}
  4. for file in froms:
  5. with open(file,'r') as f:
  6. for item in json.load(f)['cards']:
  7. mapping.update({item['name']:item[key]})
  8. with open(dest,'w') as f:
  9. json.dump(mapping,f)