-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
With the new expansion as well as the backer cards and various reworks, the card data is woefully out of date. My PC is giving me grief with dependencies to spin up a local instance to test (my fault), but I believe this data is correctly formatted with the new cards:
Generated by very simple Python script.
import json
import re
factions = {
1: "lyonar",
2: "songhai",
3: "vetruvian",
4: "abyssian",
5: "magmar",
6: "vanar",
100: "neutral"
}
with open("cards.json") as f:
card_data = json.load(f)
for card in card_data:
card["factionId"] = card["faction"]
card["faction"] = factions[card["faction"]]
if "breathing" in card["resource"].keys():
card["spriteName"] = re.match(r".*/(.*)Breathing.gif", card["resource"]["breathing"]).group(1)
else:
card["spriteName"] = re.match(r".*/(.*)Idle.gif", card["resource"]["idle"]).group(1)
with open("carddata.json", "w") as f:
json.dump(card_data, f)Would it be possible to update the site? 🙏
Metadata
Metadata
Assignees
Labels
No labels