mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Improve editions for tracking scripts
This commit is contained in:
@@ -8,5 +8,5 @@ Type=Reprint
|
|||||||
62 R Saheeli's Artistry
|
62 R Saheeli's Artistry
|
||||||
80 U Essence Extraction
|
80 U Essence Extraction
|
||||||
130 R Skyship Stalker
|
130 R Skyship Stalker
|
||||||
151 Cultivator of Blades
|
151 R Cultivator of Blades
|
||||||
200 U Chief of the Foundry
|
200 U Chief of the Foundry
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Code=CMB1
|
Code=CMB1
|
||||||
Date=2019-11-07
|
Date=2019-11-07
|
||||||
Name=Mystery Booster Playtest Cards
|
Name=Mystery Booster Playtest Cards
|
||||||
|
Border=Silver
|
||||||
Code2=CMB1
|
Code2=CMB1
|
||||||
MciCode=cmb1
|
MciCode=cmb1
|
||||||
Type=Other
|
Type=Other
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ R Rathi Assassin
|
|||||||
R Revenant
|
R Revenant
|
||||||
R Ryusei, the Falling Star
|
R Ryusei, the Falling Star
|
||||||
2 S Sewers of Estark
|
2 S Sewers of Estark
|
||||||
Shield of Kaldra
|
R Shield of Kaldra
|
||||||
R Silent Specter
|
R Silent Specter
|
||||||
R Soul Collector
|
R Soul Collector
|
||||||
R Sword of Kaldra
|
R Sword of Kaldra
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ Type=Reprint
|
|||||||
|
|
||||||
[cards]
|
[cards]
|
||||||
22 R Legion's Landing
|
22 R Legion's Landing
|
||||||
74 Search for Azcanta
|
74 R Search for Azcanta
|
||||||
90 R Arguel's Blood Fast
|
90 R Arguel's Blood Fast
|
||||||
173 Vance's Blasting Cannons
|
173 R Vance's Blasting Cannons
|
||||||
191 Growing Rites of Itlimoc
|
191 R Growing Rites of Itlimoc
|
||||||
234 Conqueror's Galleon
|
234 R Conqueror's Galleon
|
||||||
235 Dowsing Dagger
|
235 R Dowsing Dagger
|
||||||
243 Primal Amulet
|
243 R Primal Amulet
|
||||||
249 Thaumatic Compass
|
249 R Thaumatic Compass
|
||||||
250 Treasure Map
|
250 R Treasure Map
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ allJsonUrl = 'http://mtgjson.com/json/AllCards.json'
|
|||||||
|
|
||||||
def initializeEditions():
|
def initializeEditions():
|
||||||
ignoredTypes = [ "From_the_Vault", "Duel_Decks", "Online", "Premium_Deck_Series" ]
|
ignoredTypes = [ "From_the_Vault", "Duel_Decks", "Online", "Premium_Deck_Series" ]
|
||||||
|
ignoredBorders = [ "Silver" ]
|
||||||
editionSections = [ "[cards]", "[precon product]", "[borderless]", "[showcase]", "[extended art]", "[buy a box]", "[promo]" ]
|
editionSections = [ "[cards]", "[precon product]", "[borderless]", "[showcase]", "[extended art]", "[buy a box]", "[promo]" ]
|
||||||
|
|
||||||
print("Parsing Editions folder")
|
print("Parsing Editions folder")
|
||||||
@@ -24,7 +25,7 @@ def initializeEditions():
|
|||||||
with open(os.path.join(root, fileName)) as currentEdition:
|
with open(os.path.join(root, fileName)) as currentEdition:
|
||||||
# Check all names for this card
|
# Check all names for this card
|
||||||
metadata = True
|
metadata = True
|
||||||
setcode = setname = settype = None
|
setcode = setname = settype = border = None
|
||||||
for line in currentEdition.readlines():
|
for line in currentEdition.readlines():
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if metadata:
|
if metadata:
|
||||||
@@ -33,7 +34,7 @@ def initializeEditions():
|
|||||||
if setcode and setcode not in setCodes:
|
if setcode and setcode not in setCodes:
|
||||||
setCodes.append(setcode)
|
setCodes.append(setcode)
|
||||||
setCodeToName[setcode] = setname
|
setCodeToName[setcode] = setname
|
||||||
if settype in ignoredTypes:
|
if settype in ignoredTypes or border in ignoredBorders:
|
||||||
ignoredSet.append(setcode)
|
ignoredSet.append(setcode)
|
||||||
|
|
||||||
elif line.startswith("Code="):
|
elif line.startswith("Code="):
|
||||||
@@ -45,6 +46,9 @@ def initializeEditions():
|
|||||||
elif line.startswith("Type="):
|
elif line.startswith("Type="):
|
||||||
settype = line.split("=")[1].rstrip()
|
settype = line.split("=")[1].rstrip()
|
||||||
|
|
||||||
|
elif line.startswith("Border="):
|
||||||
|
border = line.split("=")[1].rstrip()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if not line:
|
if not line:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user