Allow differential priorities for mass decks

master
trémeur 5 days ago
parent df1b89a053
commit d2157a3bb3

@ -27,8 +27,9 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards
- =faves=: a list of cards to showcase on the index page - =faves=: a list of cards to showcase on the index page
- =headerbackground=: an HTML colour to display behind your header image and set as a theme colour - =headerbackground=: an HTML colour to display behind your header image and set as a theme colour
- =british=: =True= if you want “grey” to display on the site, =False= if you want “gray” - =british=: =True= if you want “grey” to display on the site, =False= if you want “gray”
- =collectthreshold=: minimum number of owned cards for putting a deck in the “collecting” category - =collectthreshold=: minimum number of owned cards for putting a deck in the “collecting” category (all cards in mass decks will be included)
- =mediumthreshold=: minimum number of owned cards for marking a deck as medium priority - =mediumthreshold=: minimum number of owned cards for marking a deck as medium priority
- =massmediumthreshold=: minimum number of owned cards for marking a deck in a mass deck medium priority (should normally be lower than =mediumthreshold=)
- =highthreshold=: minimum number of owned cards for marking a deck as high priority - =highthreshold=: minimum number of owned cards for marking a deck as high priority
- =keepsig=: =True= if you always want to keep one copy of your signature, =False= if you want to make them all available for trading - =keepsig=: =True= if you always want to keep one copy of your signature, =False= if you want to make them all available for trading
- =tradestatement=: statement to place on your trading page - =tradestatement=: statement to place on your trading page

@ -122,7 +122,7 @@ for event in log.log:
if thedeck in variables.highpriority: if thedeck in variables.highpriority:
thecard["priority"] = 1 thecard["priority"] = 1
elif len(thecard["mass"]) > 0: elif len(thecard["mass"]) > 0:
thecard["priority"] = 2 thecard["priority"] = 3
else: else:
thecard["priority"] = 4 thecard["priority"] = 4
cardlist.append(thecard) cardlist.append(thecard)
@ -309,7 +309,12 @@ for deck in decks:
thedeck["mastered"] = False thedeck["mastered"] = False
if deck in variables.highpriority or count >= variables.highthreshold or deck in portdecks or thedeck["colour"] == "limited": if deck in variables.highpriority or count >= variables.highthreshold or deck in portdecks or thedeck["colour"] == "limited":
thedeck["priority"] = 1 thedeck["priority"] = 1
elif len(thedeck["mass"]) > 0 or count >= variables.mediumthreshold: elif len(thedeck["mass"]) > 0:
if count >= variables.massmediumthreshold:
thedeck["priority"] = 2
else:
thedeck["priority"] = 3
elif count >= variables.mediumthreshold:
thedeck["priority"] = 2 thedeck["priority"] = 2
elif count >= variables.collectthreshold: elif count >= variables.collectthreshold:
thedeck["priority"] = 3 thedeck["priority"] = 3

@ -11,6 +11,7 @@ headerbackground = "#000000"
british = True british = True
collectthreshold = 2 collectthreshold = 2
mediumthreshold = 5 mediumthreshold = 5
massmediumthreshold = 1
highthreshold = 10 highthreshold = 10
keepsig = False keepsig = False
tradestatement = "" tradestatement = ""

Loading…
Cancel
Save