Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Python Script to Modify Card Conjurer Save
import json
CARD_FILE_IN = 'card_save.json'
CARD_FILE_OUT = 'card_save_fixed.json'
with open(CARD_FILE_IN, 'rb') as fd:
data = json.load(fd)
for i, card in enumerate(data):
card["data"]["bottomInfo"]["wizards"]["text"] = ''
card["data"]["bottomInfo"]["bottomRight"]["text"] = ''
card["data"]["infoArtist"] = 'Mike Mignola'
card["data"]["infoSet"] = 'HLB'
card["data"]["infoNumber"] = str(i)
card["data"]["infoArtist"] = 'Mike Mignola'
card["data"]["setSymbolSource"] = "http://localhost:8000/pics/bprd.svg"
card["data"]["setSymbolZoom"] = 0.18
with open(CARD_FILE_OUT, 'w') as fd:
json.dump(data, fd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment