Download anniversary decks manually

This commit is contained in:
mez 2025-06-01 21:21:02 +01:00
parent 256beac9b7
commit 695146cac1
3 changed files with 21 additions and 14 deletions

View file

@ -42,6 +42,7 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards
- =misclink=: under ="link"=, a link to any page you choose, and under ~"text"~, text to display as the link - =misclink=: under ="link"=, a link to any page you choose, and under ~"text"~, text to display as the link
- =donations= : lists of donated decks and individual scrapbook cards - =donations= : lists of donated decks and individual scrapbook cards
- =masscollect=: list (python dict) of series/themes being mass collected, each containing at least one of ="decks"= specifying a list of decks, or ="singles"= specifying a list of individual cards - =masscollect=: list (python dict) of series/themes being mass collected, each containing at least one of ="decks"= specifying a list of decks, or ="singles"= specifying a list of individual cards
- =anniversary= : list of current anniversary decks
- Run the following: - Run the following:
#+BEGIN_SRC bash #+BEGIN_SRC bash
python3 setup.py python3 setup.py

View file

@ -116,7 +116,8 @@ for event in log.log:
try: try:
thecard["colour"] = deckkey[thedeck] thecard["colour"] = deckkey[thedeck]
except: except:
pass if thedeck in variables.anniversary:
thecard["colour"] = "limited"
try: try:
if thecard["colour"]: if thecard["colour"]:
pass pass
@ -421,6 +422,9 @@ decklist = []
for deck in decks: for deck in decks:
thedeck = {} thedeck = {}
thedeck["name"] = deck thedeck["name"] = deck
if deck in variables.anniversary:
thedeck["colour"] = "limited"
else:
thedeck["colour"] = deckkey[deck] thedeck["colour"] = deckkey[deck]
thedeck["mass"] = [] thedeck["mass"] = []
thedeck["massmaster"] = [] thedeck["massmaster"] = []
@ -484,6 +488,7 @@ if __name__ == "__main__":
for deck in decklist: for deck in decklist:
if not os.path.isdir("build/decks/" + deck["name"]): if not os.path.isdir("build/decks/" + deck["name"]):
os.mkdir("build/decks/" + deck["name"]) os.mkdir("build/decks/" + deck["name"])
if deck["colour"] != "limited":
print("Downloading " + deck["name"]) print("Downloading " + deck["name"])
number = 0 number = 0
while number < 21: while number < 21:

View file

@ -23,3 +23,4 @@ firstmasteries = ["deckname","nameofdeck"]
misclink = {"link":"","text":""} misclink = {"link":"","text":""}
donations = {"decks":[],"scrapbook":[]} donations = {"decks":[],"scrapbook":[]}
masscollect = {"series":{"decks":["firstdeck","seconddeck"],"singles":["card01","card02"]}} masscollect = {"series":{"decks":["firstdeck","seconddeck"],"singles":["card01","card02"]}}
anniversary = ["deckname"]