diff --git a/.gitignore b/.gitignore index 89bef5c..a44f07e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,6 @@ build/assets/misc/ __pycache__/ variables.py log.py +trade.py build/user.css key.html \ No newline at end of file diff --git a/README.org b/README.org index c866593..45c4d9e 100644 --- a/README.org +++ b/README.org @@ -14,6 +14,7 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards cd tcg cp log-template.py log.py cp variables-template.py variables.py + cp trade-template.py trade.py #+END_SRC - Edit =variables.py= to set the variables as follows: - =servername=: name set for your remote in =rclone= diff --git a/colors.py b/colors.py index 5f569bd..d530975 100644 --- a/colors.py +++ b/colors.py @@ -89,16 +89,19 @@ for event in log.log: thecard["name"] = card thecard["received"] = event["date"] thecard["mass"] = [] + thecard["priority"] = 0 if card[0:4] != "sig_": for theme in variables.masscollect: try: if thedeck in variables.masscollect[theme]["decks"]: thecard["mass"].append(theme) + thecard["priority"] = 3 except KeyError: pass try: if card in variables.masscollect[theme]["singles"]: thecard["mass"].append(theme) + thecard["priority"] = 2 except KeyError: pass if card[0:4] == "sig_": @@ -119,12 +122,13 @@ for event in log.log: else: thecard["priority"] = 1 else: - if thedeck in variables.highpriority: - thecard["priority"] = 1 - elif len(thecard["mass"]) > 0: - thecard["priority"] = 3 - else: - thecard["priority"] = 4 + if thecard["priority"] == 0: + if thedeck in variables.highpriority: + thecard["priority"] = 1 + elif len(thecard["mass"]) > 0: + thecard["priority"] = 3 + else: + thecard["priority"] = 4 cardlist.append(thecard) datelist.append(event["date"]) receivedcards.append(thecard) @@ -1148,7 +1152,7 @@ def indexgen(): if len(variables.subfolder) > 0: content.write("/" + variables.subfolder) content.write("/assets/banner.png\" loading=\"lazy\">") - content.write("\n