Skip to content

Commit

Permalink
Merge pull request #10 from ThePieBandit/wots
Browse files Browse the repository at this point in the history
War of the Spark Fixes
  • Loading branch information
ThePieBandit authored Oct 9, 2020
2 parents 6f33e67 + 16bb4ae commit 491069d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/tcg-to-deckbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
def replace_strings(dict, replacementSection, columnName):
if dict[columnName].lower() in configParser[replacementSection].keys():
dict[columnName]=configParser[replacementSection][dict[columnName].lower()]

def getPathPrefix():
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
Expand Down Expand Up @@ -91,10 +91,19 @@ def getPathPrefix():
#For BFZ lands...there's no differentiator from the full arts and the non full arts.
row["Name"]=row["Name"].replace(" - Full Art","")

#Very specifc conditons
if row["Name"].contains("(JP Alternate Art)") and row["Edition"] == "War of the Spark":
row["Edition"] = "War of the Spark Japanese Alternate Art"
row["Name"]=row["Name"].replace(" (JP Alternate Art)","")


# Remove numbers, mostly for lands, but for some other special cases (M21 Teferi)
row["Name"] = re.sub(r" \(\d+\)", "", row["Name"])
replace_strings(row, "NAMES", "Name")

# remove weird symbols from card numbers
row["Card Number"] = re.sub(r"[*★]", "", row["Card Number"])

# Map Specific Edition Names
replace_strings(row, "EDITONS", "Edition")

Expand Down

0 comments on commit 491069d

Please sign in to comment.