From 5a4de3d8cd1d2052e55e59274c016901b1f7eadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sat, 16 Nov 2024 18:47:53 +0000 Subject: [PATCH] Sort faves alphabetically --- indexgen.py | 3 ++- tcgcore.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indexgen.py b/indexgen.py index fd2096f..f8ff12d 100644 --- a/indexgen.py +++ b/indexgen.py @@ -264,7 +264,8 @@ def indexgen(): content.write("

\n") if len(variables.faves) > 0: content.write("

faves

\n

") - for card in variables.faves: + faveslist = sorted(variables.faves) + for card in faveslist: content.write(tcgcore.printcard(card)) content.write("

\n") content.close() diff --git a/tcgcore.py b/tcgcore.py index c2ba491..a062911 100644 --- a/tcgcore.py +++ b/tcgcore.py @@ -62,7 +62,7 @@ def datemastered(deck): return mastered def collecting(deck): - if len (deckcards(deck)) < 20: + if 0 < len (deckcards(deck)) < 20: if deck in variables.highpriority: return True else: