\n \n" + str(cardstotal) + " cards held\nStarted " + firstdate.strftime("%Y-%m-%d") + " \n\n")
+ if cardstotal > 14400:
+ rankcode = "rainbow"
+ extra = cardstotal - 14400
+ plusranks = int(extra / 300)
+ if plusranks > 0:
+ rank = "rainbow + " + str(plusranks)
+ else:
+ rank = "rainbow"
+ else:
+ if cardstotal > 14100:
+ rank = "himalayan"
+ elif cardstotal > 13800:
+ rank = "puma"
+ elif cardstotal > 13500:
+ rank = "chartreux"
+ elif cardstotal > 13500:
+ rank = "russian blue"
+ elif cardstotal > 12900:
+ rank = "panther"
+ elif cardstotal > 12600:
+ rank = "cheetah"
+ elif cardstotal > 12300:
+ rank = "tiger"
+ elif cardstotal > 12000:
+ rank = "lion"
+ elif cardstotal > 11700:
+ rank = "metal"
+ elif cardstotal > 11400:
+ rank = "ground"
+ elif cardstotal > 11100:
+ rank = "darkness"
+ elif cardstotal > 10800:
+ rank = "water"
+ elif cardstotal > 10500:
+ rank = "nature"
+ elif cardstotal > 10200:
+ rank = "light"
+ elif cardstotal > 9900:
+ rank = "wind"
+ elif cardstotal > 9600:
+ rank = "fire"
+ elif cardstotal > 9300:
+ rank = "mercury"
+ elif cardstotal > 9000:
+ rank = "jupiter"
+ elif cardstotal > 8700:
+ rank = "uranus"
+ elif cardstotal > 8400:
+ rank = "neptune"
+ elif cardstotal > 8100:
+ rank = "earth"
+ elif cardstotal > 7800:
+ rank = "venus"
+ elif cardstotal > 7500:
+ rank = "saturn"
+ elif cardstotal > 7200:
+ rank = "mars"
+ elif cardstotal > 6900:
+ rank = "magnolia"
+ elif cardstotal > 6600:
+ rank = "chocolate cosmos"
+ elif cardstotal > 6300:
+ rank = "lilac"
+ elif cardstotal > 6000:
+ rank = "hydrangea"
+ elif cardstotal > 5700:
+ rank = "clover"
+ elif cardstotal > 5400:
+ rank = "daffodil"
+ elif cardstotal > 5100:
+ rank = "tiger lily"
+ elif cardstotal > 4800:
+ rank = "sakura"
+ elif cardstotal > 4500:
+ rank = "silver"
+ elif cardstotal > 4200:
+ rank = "bronze"
+ elif cardstotal > 3900:
+ rank = "amethyst"
+ elif cardstotal > 3600:
+ rank = "sapphire"
+ elif cardstotal > 3300:
+ rank = "emerald"
+ elif cardstotal > 3000:
+ rank = "gold"
+ elif cardstotal > 2700:
+ rank = "amber"
+ elif cardstotal > 2400:
+ rank = "ruby"
+ elif cardstotal > 2200:
+ rank = "dragon fruit"
+ elif cardstotal > 2000:
+ rank = "apricot"
+ elif cardstotal > 1800:
+ rank = "grape"
+ elif cardstotal > 1600:
+ rank = "blueberry"
+ elif cardstotal > 1400:
+ rank = "lime"
+ elif cardstotal > 1200:
+ rank = "lemon"
+ elif cardstotal > 1000:
+ rank = "tangerine"
+ elif cardstotal > 800:
+ rank = "strawberry"
+ elif cardstotal > 700:
+ rank = "gray"
+ elif cardstotal > 600:
+ rank = "brown"
+ elif cardstotal > 500:
+ rank = "purple"
+ elif cardstotal > 400:
+ rank = "blue"
+ elif cardstotal > 300:
+ rank = "green"
+ elif cardstotal > 200:
+ rank = "yellow"
+ elif cardstotal > 100:
+ rank = "orange"
+ else:
+ rank = "red"
+ rankcode = re.sub(" ","",rank)
+ content.write("\n\n- " + str(cardstotal) + " cards held (" + rank + ")
\n- started
" + firstdate.strftime("%Y-%m-%d") + " \n- last updated
" + datetime.datetime.today().strftime("%Y-%m-%d") + " \n- code under construction
\n \n")
+ if len(variables.faves) > 0:
+ content.write("faves\n")
+ for card in variables.faves:
+ deck = card[:-2]
+ cardid = card[-2:]
+ content.write("")
+ content.write(" \n")
content.close()
skel.footerwrite(thefile)
diff --git a/log-template.py b/log-template.py
index c6f33b8..80f26bc 100644
--- a/log-template.py
+++ b/log-template.py
@@ -1,3 +1,3 @@
import datetime
-log = [{"date":datetime.datetime(Y,M,D),"url":"link to comment","received":["card01","card02"]}]
+log = [{"event":"event name","date":datetime.datetime(Y,M,D),"url":"link to comment","received":["card01","card02"]}]
diff --git a/loggen.py b/loggen.py
index 6d5fe75..56d36d8 100644
--- a/loggen.py
+++ b/loggen.py
@@ -15,12 +15,33 @@ def loggen():
content.write("" + event["date"].strftime("%Y-%m-%d") + " : Received ")
receivedlist = sorted(event["received"])
for card in receivedlist:
- content.write("" + card + " ")
+ with open("build/decks/" + card[:-2] + "/type") as thetype:
+ cardtype = thetype.read()
+ content.write("")
+ if cardtype == "red":
+ content.write("🔴")
+ elif cardtype == "orange":
+ content.write("🟠")
+ elif cardtype == "yellow":
+ content.write("🟡")
+ elif cardtype == "green":
+ content.write("🟢")
+ elif cardtype == "blue":
+ content.write("🔵")
+ elif cardtype == "purple":
+ content.write("🟣")
+ elif cardtype == "brown":
+ content.write("🟤")
+ elif cardtype == "gray":
+ content.write("⚪")
+ elif cardtype == "special":
+ content.write("✨")
+ content.write(card + "")
if receivedlist.index(card) == len(receivedlist) - 1:
content.write(" ")
else:
content.write(", ")
- content.write(" [x]. \n")
+ content.write(" [" + event["event"] + "].\n")
content.close()
skel.footerwrite(thefile)
diff --git a/priority-template.py b/priority-template.py
deleted file mode 100644
index 3e6aadc..0000000
--- a/priority-template.py
+++ /dev/null
@@ -1 +0,0 @@
-high = ["deckname"]
diff --git a/skel.py b/skel.py
index 741aad2..201a7c0 100644
--- a/skel.py
+++ b/skel.py
@@ -1,6 +1,8 @@
+import variables
+
def headerwrite(thefile,pagename):
header = open(thefile,"a")
- header.write("\n\n \n \n \n \n TCG\n \n \n \n \n \n")
header.close()
def footerwrite(thefile):
diff --git a/variables-template.py b/variables-template.py
new file mode 100644
index 0000000..5ec8c02
--- /dev/null
+++ b/variables-template.py
@@ -0,0 +1,4 @@
+highpriority = ["deckname","nameofadeck"]
+tradepost = "URL"
+faves = ["favecard01","favecard02"]
+headerbackground = "#000000"
diff --git a/wantedgen.py b/wantedgen.py
index d5958df..28100e9 100644
--- a/wantedgen.py
+++ b/wantedgen.py
@@ -1,5 +1,5 @@
import datetime,os
-import log,priority,skel
+import log,variables,skel
def wantedgen():
if not os.path.isdir("build/wanted"):
@@ -28,14 +28,35 @@ def wantedgen():
highpriority = []
medpriority = []
for card in wantedcards:
- if card[:-2] in priority.high:
+ if card[:-2] in variables.highpriority:
highpriority.append(card)
else:
medpriority.append(card)
if len(highpriority) > 0:
content.write("High priority: ")
for card in highpriority:
- content.write("" + card + " ")
+ with open("build/decks/" + card[:-2] + "/type") as thetype:
+ cardtype = thetype.read()
+ content.write("")
+ if cardtype == "red":
+ content.write("🔴")
+ elif cardtype == "orange":
+ content.write("🟠")
+ elif cardtype == "yellow":
+ content.write("🟡")
+ elif cardtype == "green":
+ content.write("🟢")
+ elif cardtype == "blue":
+ content.write("🔵")
+ elif cardtype == "purple":
+ content.write("🟣")
+ elif cardtype == "brown":
+ content.write("🟤")
+ elif cardtype == "gray":
+ content.write("⚪")
+ elif cardtype == "special":
+ content.write("✨")
+ content.write(card + "")
if highpriority.index(card) == len(highpriority) - 1:
content.write(" ")
else:
@@ -44,7 +65,28 @@ def wantedgen():
if len(medpriority) > 0:
content.write(" Medium priority: ")
for card in medpriority:
- content.write("" + card + " ")
+ with open("build/decks/" + card[:-2] + "/type") as thetype:
+ cardtype = thetype.read()
+ content.write("")
+ if cardtype == "red":
+ content.write("🔴")
+ elif cardtype == "orange":
+ content.write("🟠")
+ elif cardtype == "yellow":
+ content.write("🟡")
+ elif cardtype == "green":
+ content.write("🟢")
+ elif cardtype == "blue":
+ content.write("🔵")
+ elif cardtype == "purple":
+ content.write("🟣")
+ elif cardtype == "brown":
+ content.write("🟤")
+ elif cardtype == "gray":
+ content.write("⚪")
+ elif cardtype == "special":
+ content.write("✨")
+ content.write(card + "")
if medpriority.index(card) == len(medpriority) - 1:
content.write(" ")
else:
|