Change default priority to low, add crayons, general refactoring
After Width: | Height: | Size: 393 B |
After Width: | Height: | Size: 363 B |
After Width: | Height: | Size: 370 B |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 384 B |
After Width: | Height: | Size: 381 B |
After Width: | Height: | Size: 379 B |
After Width: | Height: | Size: 601 B |
@ -1,7 +1,8 @@
|
||||
import indexgen,collectinggen,ownedgen,wantedgen,loggen
|
||||
import indexgen,collectinggen,ownedgen,wantedgen,loggen,levelsgen
|
||||
|
||||
indexgen.indexgen()
|
||||
collectinggen.collectinggen()
|
||||
ownedgen.ownedgen()
|
||||
wantedgen.wantedgen()
|
||||
loggen.loggen()
|
||||
levelsgen.levelsgen()
|
||||
|
@ -0,0 +1,252 @@
|
||||
import datetime,os,re
|
||||
import log,skel
|
||||
|
||||
def levelsgen():
|
||||
if not os.path.isdir("build/levels"):
|
||||
os.mkdir("build/levels")
|
||||
if os.path.exists("build/levels/index.html"):
|
||||
os.remove("build/levels/index.html")
|
||||
thefile = "build/levels/index.html"
|
||||
skel.headerwrite(thefile,"levels")
|
||||
content = open(thefile,"a")
|
||||
content.write("<h1>levels</h1>\n")
|
||||
datecard = {}
|
||||
cardno = -1
|
||||
for event in log.log:
|
||||
try:
|
||||
for card in event["received"]:
|
||||
cardno += 1
|
||||
datecard[cardno] = event["date"]
|
||||
except:
|
||||
pass
|
||||
firstdate = log.log[0]["date"]
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/red.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + firstdate.strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/orange.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[100].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/yellow.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[200].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/green.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[300].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/blue.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[400].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/purple.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[500].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/brown.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[600].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/gray.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[700].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/strawberry.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[800].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/tangerine.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[1000].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/lemon.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[1200].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/lime.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[1400].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/blueberry.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[1600].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/grape.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[1800].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/apricot.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[2000].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/dragonfruit.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[2200].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/ruby.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[2400].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/amber.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[2700].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/gold.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[3000].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/emerald.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[3300].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/sapphire.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[3600].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/amethyst.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[3900].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/bronze.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[5200].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/silver.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[4500].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/sakura.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[4800].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/tigerlily.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[5100].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/daffodil.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[5400].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/clover.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[5700].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/hydrangea.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[6000].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/lilac.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[6300].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/chocolatecosmos.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[6600].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/magnolia.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[6900].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/mars.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[7200].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/saturn.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[7500].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/venus.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[7800].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/earth.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[8100].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/neptune.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[8400].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/uranus.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[8700].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/jupiter.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[9000].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/mercury.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[9300].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/fire.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[9600].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/wind.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[9900].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/light.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[10200].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/nature.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[10500].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/water.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[10800].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/darkness.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[11100].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/ground.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[11400].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/metal.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[11700].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/lion.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[12000].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/tiger.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[12300].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/cheetah.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[12600].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/panther.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[12900].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/russianblue.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[13200].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/chartreux.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[13500].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/puma.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[13800].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/himalayan.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[14100].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
content.write("<table class=\"level\">\n<tbody>\n<tr>\n<td align=\"center\"><img src=\"/assets/levels/rainbow.gif\"></td>\n</tr>\n<tr>\n<td align=\"center\"><code>" + datecard[14400].strftime("%Y-%m-%d") + "</code></td>\n</tr>\n</tbody>\n</table>\n")
|
||||
except:
|
||||
pass
|
||||
content.close()
|
||||
skel.footerwrite(thefile)
|
||||
|
||||
if __name__ == "__main__":
|
||||
levelsgen()
|
@ -0,0 +1,71 @@
|
||||
import log
|
||||
|
||||
def ownedcards():
|
||||
ownedcards = []
|
||||
for event in log.log:
|
||||
try:
|
||||
for card in event["received"]:
|
||||
ownedcards.append(card)
|
||||
except:
|
||||
pass
|
||||
return sorted(ownedcards)
|
||||
|
||||
def cardtext(card):
|
||||
cardtext = "<span class=\"cardname\">"
|
||||
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 + "</span>"
|
||||
return cardtext
|
||||
|
||||
def printcard(card):
|
||||
deck = card[:-2]
|
||||
cardid = card[-2:]
|
||||
return "<img src=\"/decks/" + deck + "/" + cardid + ".gif\" title=\"" + card + "\">"
|
||||
|
||||
def printdeck(deck):
|
||||
deckstring = "<table class=\"decktable "
|
||||
with open("build/decks/" + deck + "/type") as thetype:
|
||||
decktype = thetype.read()
|
||||
deckstring += decktype + "\">\n<thead>\n <tr>\n <th colspan=\"5\">" + deck + " ["
|
||||
deckcards = []
|
||||
for card in ownedcards():
|
||||
if card[:-2] == deck:
|
||||
deckcards.append(int(card[-2:]))
|
||||
deckcards = sorted(list(dict.fromkeys(deckcards)))
|
||||
deckstring += str(len(deckcards)) + "/20]</th>\n </tr>\n</thead>\n<tbody>\n"
|
||||
test = 1
|
||||
while test < 21:
|
||||
if test % 5 == 1:
|
||||
deckstring += " <tr>\n"
|
||||
deckstring += " <td><img src=\"/decks/" + deck + "/"
|
||||
if test in deckcards:
|
||||
if test > 9:
|
||||
deckstring += str(test)
|
||||
else:
|
||||
deckstring += "0" + str(test)
|
||||
else:
|
||||
deckstring += "00"
|
||||
deckstring += ".gif\"></td>\n"
|
||||
if test % 5 == 0:
|
||||
deckstring += " </tr>\n"
|
||||
test += 1
|
||||
deckstring += "</tbody>\n</table>\n"
|
||||
return deckstring
|
@ -1,4 +1,6 @@
|
||||
highpriority = ["deckname","nameofadeck"]
|
||||
medpriority = ["deckname","nameofdeck"]
|
||||
tradepost = "URL"
|
||||
faves = ["favecard01","favecard02"]
|
||||
headerbackground = "#000000"
|
||||
british = True
|
||||
|