Remove useless parameter
This commit is contained in:
parent
85245c328b
commit
a389b40e21
3 changed files with 20 additions and 21 deletions
|
@ -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
|
||||
- =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
|
||||
- =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:
|
||||
#+BEGIN_SRC bash
|
||||
python3 setup.py
|
||||
|
|
37
new.py
37
new.py
|
@ -365,28 +365,27 @@ for card in cardlist:
|
|||
cardnames.append(card["name"])
|
||||
|
||||
for theme in variables.masscollect:
|
||||
if variables.masscollect[theme]["full"] == True:
|
||||
try:
|
||||
for deck in variables.masscollect[theme]["decks"]:
|
||||
if deck not in decknames:
|
||||
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:
|
||||
try:
|
||||
for deck in variables.masscollect[theme]["decks"]:
|
||||
if deck not in decknames:
|
||||
for number in numbers:
|
||||
wantedcard = {}
|
||||
wantedcard["name"] = card
|
||||
wantedcard["colour"] = deckkey[card[:-2]]
|
||||
wantedcard["name"] = deck + number
|
||||
wantedcard["colour"] = deckkey[deck]
|
||||
wantedcard["priority"] = 3
|
||||
wantedlist.append(wantedcard)
|
||||
except KeyError:
|
||||
pass
|
||||
except KeyError:
|
||||
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"])
|
||||
|
||||
|
|
|
@ -17,4 +17,4 @@ ownedpage = False
|
|||
firstmasteries = ["deckname","nameofdeck"]
|
||||
misclink = {"link":"","text":""}
|
||||
donations = {"decks":[],"scrapbook":[]}
|
||||
masscollect = {"series":{"full":True,"decks":["firstdeck","seconddeck"],"singles":["card01","card02"]}}
|
||||
masscollect = {"series":{"decks":["firstdeck","seconddeck"],"singles":["card01","card02"]}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue