Account for anniversary decks

master
trémeur 1 week ago
parent 8d2d6abdbc
commit 19c56c6abf

@ -122,7 +122,7 @@ table.decktable.gray th, details.deckwrap:has(.gray) summary {
color: white; color: white;
} }
table.decktable.special th, details.deckwrap:has(.special) summary { table.decktable.special th, details.deckwrap:has(.special) summary, table.decktable.limited th, details.deckwrap:has(.limited) summary {
background: linear-gradient(90deg, hsl(0, 100%, 70%), hsl(30, 100%, 70%), hsl(60, 100%, 70%), hsl(90, 100%, 70%), hsl(120, 100%, 70%), hsl(150, 100%, 70%), hsl(180, 100%, 70%), hsl(210, 100%, 70%), hsl(240, 100%, 70%), hsl(270, 100%, 70%), hsl(300, 100%, 70%), hsl(330, 100%, 70%), hsl(360, 100%, 70%)); background: linear-gradient(90deg, hsl(0, 100%, 70%), hsl(30, 100%, 70%), hsl(60, 100%, 70%), hsl(90, 100%, 70%), hsl(120, 100%, 70%), hsl(150, 100%, 70%), hsl(180, 100%, 70%), hsl(210, 100%, 70%), hsl(240, 100%, 70%), hsl(270, 100%, 70%), hsl(300, 100%, 70%), hsl(330, 100%, 70%), hsl(360, 100%, 70%));
color: black; color: black;
} }

@ -3,7 +3,7 @@ from bs4 import BeautifulSoup
from collections import Counter from collections import Counter
import log,variables import log,variables
values = ["red","orange","yellow","green","blue","purple","brown","gray","special"] values = ["red","orange","yellow","green","blue","purple","brown","gray","special","limited"]
numbers = ["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20"] numbers = ["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20"]
print("Getting list of deck colours") print("Getting list of deck colours")
@ -33,6 +33,8 @@ for row in souprows:
decktype = soupcells[3].text.lower() decktype = soupcells[3].text.lower()
if decktype in values: if decktype in values:
deckkey[deckname] = decktype deckkey[deckname] = decktype
elif decktype == "n/a":
deckkey[deckname] = "limited"
print("Parsing log") print("Parsing log")
@ -305,7 +307,7 @@ for deck in decks:
thedeck["mastered"] = dates[-1] thedeck["mastered"] = dates[-1]
else: else:
thedeck["mastered"] = False thedeck["mastered"] = False
if deck in variables.highpriority or count >= variables.highthreshold or deck in portdecks: 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 or count >= variables.mediumthreshold:
thedeck["priority"] = 2 thedeck["priority"] = 2
@ -505,33 +507,34 @@ def printcard(card):
def cardtext(card): def cardtext(card):
cardtext = "<span class=\"cardname\">" cardtext = "<span class=\"cardname\">"
if card["colour"] == "sig": if card["colour"] == "red":
cardtext += "<span title=\"signature\">✍</span>" + card["name"] + "</span>" cardtext += "<span title=\"red\">🔴</span>"
else: elif card["colour"] == "orange":
if card["colour"] == "red": cardtext += "<span title=\"orange\">🟠</span>"
cardtext += "<span title=\"red\">🔴</span>" elif card["colour"] == "yellow":
elif card["colour"] == "orange": cardtext += "<span title=\"yellow\">🟡</span>"
cardtext += "<span title=\"orange\">🟠</span>" elif card["colour"] == "green":
elif card["colour"] == "yellow": cardtext += "<span title=\"green\">🟢</span>"
cardtext += "<span title=\"yellow\">🟡</span>" elif card["colour"] == "blue":
elif card["colour"] == "green": cardtext += "<span title=\"blue\">🔵</span>"
cardtext += "<span title=\"green\">🟢</span>" elif card["colour"] == "purple":
elif card["colour"] == "blue": cardtext += "<span title=\"purple\">🟣</span>"
cardtext += "<span title=\"blue\">🔵</span>" elif card["colour"] == "brown":
elif card["colour"] == "purple": cardtext += "<span title=\"brown\">🟤</span>"
cardtext += "<span title=\"purple\">🟣</span>" elif card["colour"] == "gray":
elif card["colour"] == "brown": cardtext += "<span title=\""
cardtext += "<span title=\"brown\">🟤</span>" if variables.british:
elif card["colour"] == "gray": cardtext += "grey"
cardtext += "<span title=\"" else:
if variables.british: cardtext += "gray"
cardtext += "grey" cardtext += "\">⚪</span>"
else: elif card["colour"] == "special":
cardtext += "gray" cardtext += "<span title=\"special\">✨</span>"
cardtext += "\">⚪</span>" elif card["colour"] == "limited":
elif card["colour"] == "special": cardtext += "<span title=\"limited\">🌈</span>"
cardtext += "<span title=\"special\">✨</span>" elif card["colour"] == "sig":
cardtext += card["name"] + "</span>" cardtext += "<span title=\"signature\">✍</span>"
cardtext += card["name"] + "</span>"
return cardtext return cardtext
def portfoliogen(theportfolio,thetype,portnumber): def portfoliogen(theportfolio,thetype,portnumber):
@ -819,7 +822,7 @@ def filterwrite(page,colour=False,sigs=False):
filterstring += "grey" filterstring += "grey"
else: else:
filterstring += "gray" filterstring += "gray"
filterstring += "\">⚪</a> <a href=\"/" + page + "/special\" title=\"special\">✨</a>" filterstring += "\">⚪</a> <a href=\"/" + page + "/special\" title=\"special\">✨</a> <a href=\"/" + page + "/limited\" title=\"limited\">🌈</a>"
if sigs: if sigs:
filterstring += " <a href=\"/" + page + "/sig\" title=\"sig\">✍</a>" filterstring += " <a href=\"/" + page + "/sig\" title=\"sig\">✍</a>"
filterstring += "</p>\n" filterstring += "</p>\n"

Loading…
Cancel
Save