Remove useless parameter

master
trémeur 5 days ago
parent 85245c328b
commit a389b40e21

@ -35,7 +35,7 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards
- =firstmasteries=: a list of decks you mastered first - =firstmasteries=: a list of decks you mastered first
- =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 a dict which specifies =“full”= as either =True= or =False= (to show or hide a list of the total number of cards in the set) and contains 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
- Run the following: - Run the following:
#+BEGIN_SRC bash #+BEGIN_SRC bash
python3 setup.py python3 setup.py

@ -365,28 +365,27 @@ for card in cardlist:
cardnames.append(card["name"]) cardnames.append(card["name"])
for theme in variables.masscollect: for theme in variables.masscollect:
if variables.masscollect[theme]["full"] == True: try:
try: for deck in variables.masscollect[theme]["decks"]:
for deck in variables.masscollect[theme]["decks"]: if deck not in decknames:
if deck not in decknames: for number in numbers:
for number in numbers:
wantedcard = {}
wantedcard["name"] = deck + number
wantedcard["colour"] = deckkey[deck]
wantedcard["priority"] = 3
wantedlist.append(wantedcard)
except KeyError:
pass
try:
for card in variables.masscollect[theme]["singles"]:
if card not in cardnames:
wantedcard = {} wantedcard = {}
wantedcard["name"] = card wantedcard["name"] = deck + number
wantedcard["colour"] = deckkey[card[:-2]] wantedcard["colour"] = deckkey[deck]
wantedcard["priority"] = 3 wantedcard["priority"] = 3
wantedlist.append(wantedcard) wantedlist.append(wantedcard)
except KeyError: except KeyError:
pass pass
try:
for card in variables.masscollect[theme]["singles"]:
if card not in cardnames:
wantedcard = {}
wantedcard["name"] = card
wantedcard["colour"] = deckkey[card[:-2]]
wantedcard["priority"] = 3
wantedlist.append(wantedcard)
except KeyError:
pass
wantedlist = sorted(wantedlist, key=lambda d: d["name"]) wantedlist = sorted(wantedlist, key=lambda d: d["name"])

@ -17,4 +17,4 @@ ownedpage = False
firstmasteries = ["deckname","nameofdeck"] firstmasteries = ["deckname","nameofdeck"]
misclink = {"link":"","text":""} misclink = {"link":"","text":""}
donations = {"decks":[],"scrapbook":[]} donations = {"decks":[],"scrapbook":[]}
masscollect = {"series":{"full":True,"decks":["firstdeck","seconddeck"],"singles":["card01","card02"]}} masscollect = {"series":{"decks":["firstdeck","seconddeck"],"singles":["card01","card02"]}}

Loading…
Cancel
Save