diff --git a/README.org b/README.org index 543bdee..9585ae5 100644 --- a/README.org +++ b/README.org @@ -32,7 +32,7 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards - =maxmastered=: maximum number of most recently mastered decks to show on the index page - =ownedpage=: =True= if you want a page displaying your entire collection, =False= otherwise - =firstmasteries=: a list of decks you mastered first - - =masscollect=: list (python dict) of series/themes being mass collected, each containing a dict which 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 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 - Run the following: #+BEGIN_SRC bash python3 setup.py diff --git a/massgen.py b/massgen.py index 111d6bb..749002c 100644 --- a/massgen.py +++ b/massgen.py @@ -31,21 +31,24 @@ def massindexgen(): content.write("

mass collecting

\n\n") content.close() @@ -67,6 +70,11 @@ def massseriesgen(series,massindex): themassdecks.append(card[:-2]) except: pass + try: + if card[:-2] in variables.masscollect[series]["masters"]: + themassdecks.append(card[:-2]) + except: + pass themassdecks = sorted(list(dict.fromkeys(themassdecks))) massmastered = [] for deck in themassdecks: diff --git a/variables-template.py b/variables-template.py index af1ec3f..561d09d 100644 --- a/variables-template.py +++ b/variables-template.py @@ -14,4 +14,4 @@ tradestatement = "" maxmastered = 20 ownedpage = False firstmasteries = ["deckname","nameofdeck"] -masscollect = {"series":{"decks":["firstdeck","seconddeck"],"singles":["card01","card02"]}} +masscollect = {"series":{"full":True,"decks":["firstdeck","seconddeck"],"singles":["card01","card02"]}}