diff --git a/build/decks/sigs/.gitkeep b/build/decks/sigs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/collectinggen.py b/collectinggen.py index 4ee916f..ef64373 100644 --- a/collectinggen.py +++ b/collectinggen.py @@ -14,7 +14,8 @@ def collectinggen(): for event in log.log: try: for card in event["received"]: - decksofinterest.append(card[:-2]) + if card[0:4] != "sig_": + decksofinterest.append(card[:-2]) except: pass decksofinterest = sorted(list(dict.fromkeys(decksofinterest))) diff --git a/indexgen.py b/indexgen.py index 7125f71..a7eaae8 100644 --- a/indexgen.py +++ b/indexgen.py @@ -130,7 +130,7 @@ def indexgen(): else: rank = "red" rankcode = re.sub(" ","",rank) - content.write("\n
" + firstdate.strftime("%Y-%m-%d") + "
" + datetime.datetime.today().strftime("%Y-%m-%d") + "
" + firstdate.strftime("%Y-%m-%d") + "
" + datetime.datetime.today().strftime("%Y-%m-%d") + "
") + for card in sigs: + content.write(tcgcore.printcard(card)) + content.write("
\n") if len(variables.faves) > 0: content.write("") for card in variables.faves: content.write(tcgcore.printcard(card)) - content.write("
\n") + content.write("\n") content.close() skel.footerwrite(thefile) diff --git a/loggen.py b/loggen.py index 14b8fc4..84c390c 100644 --- a/loggen.py +++ b/loggen.py @@ -32,11 +32,18 @@ def loggen(): if event["received"]: content.write("Received ") receivedlist = sorted(event["received"]) + position = 1 for card in receivedlist: content.write(tcgcore.cardtext(card)) - if receivedlist.index(card) != len(receivedlist) - 1: + if len(receivedlist) != position: content.write(", ") + position += 1 content.write(".") + try: + if event["crayons"]: + content.write(" ") + except: + pass except: pass try: diff --git a/ownedgen.py b/ownedgen.py index cb9aeb0..25109d6 100644 --- a/ownedgen.py +++ b/ownedgen.py @@ -11,7 +11,8 @@ def ownedgen(): content = open(thefile,"a") content.write("") for card in tcgcore.ownedcards(): - content.write(tcgcore.printcard(card)) + if card[0:4] != "sig_": + content.write(tcgcore.printcard(card)) content.write("
\n") content.close() skel.footerwrite(thefile) diff --git a/tcgcore.py b/tcgcore.py index 83f4837..35ad198 100644 --- a/tcgcore.py +++ b/tcgcore.py @@ -12,33 +12,39 @@ def ownedcards(): def cardtext(card): cardtext = "" - with open("build/decks/" + card[:-2] + "/type") as thetype: - cardtype = thetype.read() - if cardtype == "red": - cardtext += "🔴" - elif cardtype == "orange": - cardtext += "🟠" - elif cardtype == "yellow": - cardtext += "🟡" - elif cardtype == "green": - cardtext += "🟢" - elif cardtype == "blue": - cardtext += "🔵" - elif cardtype == "purple": - cardtext += "🟣" - elif cardtype == "brown": - cardtext += "🟤" - elif cardtype == "gray": - cardtext += "⚪" - elif cardtype == "special": - cardtext += "✨" - cardtext += card + "" + if card[0:4] == "sig_": + cardtext += "✍" + card + "" + else: + with open("build/decks/" + card[:-2] + "/type") as thetype: + cardtype = thetype.read() + if cardtype == "red": + cardtext += "🔴" + elif cardtype == "orange": + cardtext += "🟠" + elif cardtype == "yellow": + cardtext += "🟡" + elif cardtype == "green": + cardtext += "🟢" + elif cardtype == "blue": + cardtext += "🔵" + elif cardtype == "purple": + cardtext += "🟣" + elif cardtype == "brown": + cardtext += "🟤" + elif cardtype == "gray": + cardtext += "⚪" + elif cardtype == "special": + cardtext += "✨" + cardtext += card + "" return cardtext def printcard(card): - deck = card[:-2] - cardid = card[-2:] - return "" + if card[0:4] == "sig_": + return "" + else: + deck = card[:-2] + cardid = card[-2:] + return "" def printdeck(deck): deckstring = "