From d2157a3bb3a06685cbdd0f520723f73d7208c1e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Mon, 14 Apr 2025 19:51:17 +0100 Subject: [PATCH] Allow differential priorities for mass decks --- README.org | 3 ++- colors.py | 9 +++++++-- variables-template.py | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 34501b2..4a716a1 100644 --- a/README.org +++ b/README.org @@ -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 - =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” - - =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 + - =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 - =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 diff --git a/colors.py b/colors.py index b8c17e5..cdc855a 100644 --- a/colors.py +++ b/colors.py @@ -122,7 +122,7 @@ for event in log.log: if thedeck in variables.highpriority: thecard["priority"] = 1 elif len(thecard["mass"]) > 0: - thecard["priority"] = 2 + thecard["priority"] = 3 else: thecard["priority"] = 4 cardlist.append(thecard) @@ -309,7 +309,12 @@ for deck in decks: thedeck["mastered"] = False if deck in variables.highpriority or count >= variables.highthreshold or deck in portdecks or thedeck["colour"] == "limited": 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 elif count >= variables.collectthreshold: thedeck["priority"] = 3 diff --git a/variables-template.py b/variables-template.py index 4e0176c..f6e670d 100644 --- a/variables-template.py +++ b/variables-template.py @@ -11,6 +11,7 @@ headerbackground = "#000000" british = True collectthreshold = 2 mediumthreshold = 5 +massmediumthreshold = 1 highthreshold = 10 keepsig = False tradestatement = ""