From a03f7b3aa99a473029adc819caf753d33aea8f4b Mon Sep 17 00:00:00 2001 From: mez Date: Tue, 3 Jun 2025 22:33:18 +0100 Subject: [PATCH] Add function for checking decks mastered today --- tools.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools.py b/tools.py index d033358..508f3e4 100644 --- a/tools.py +++ b/tools.py @@ -2039,12 +2039,20 @@ def maketrade(): else: print("Nothing to trade") +def masteredtoday(): + for deck in colors.decklist: + try: + if deck["mastered"].date() == datetime.datetime.today().date(): + print(deck["name"]) + except: + pass + if __name__ == "__main__": while True: index = 0 # adapted from https://stackoverflow.com/a/64536882 indexValidList = [] print("Choose from the list:") - options = ["Get a list of potential cards to trade in for Riku’s Favors","Generate next palette portfolio","Generate next monochrome portfolio","Generate Switch It Up request","Generate Go Fish comment","Generate art shop request","Generate art studio request","Check a trade offer","Propose a trade","Get a list of random cards from tradepile (excluding specials)","Get a list of random cards from tradepile (including specials)","Check a card in the collection","Check details of a deck","See some statistics about the collection"] + options = ["Get a list of potential cards to trade in for Riku’s Favors","Generate next palette portfolio","Generate next monochrome portfolio","Generate Switch It Up request","Generate Go Fish comment","Generate art shop request","Generate art studio request","Check a trade offer","Propose a trade","Get a list of random cards from tradepile (excluding specials)","Get a list of random cards from tradepile (including specials)","Check a card in the collection","Check details of a deck","See decks mastered today","See some statistics about the collection"] for optionName in options: index = index + 1 indexValidList.extend([options.index(optionName)]) @@ -2086,6 +2094,8 @@ if __name__ == "__main__": cardcheck() elif chosen == "Check details of a deck": deckcheck() + elif chosen == "See decks mastered today": + masteredtoday() elif chosen == "Propose a trade": maketrade() print("\n")