You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
808 B
Python

3 weeks ago
import datetime,os
import log,skel
def ownedgen():
if not os.path.isdir("build/owned"):
os.mkdir("build/owned")
if os.path.exists("build/owned/index.html"):
os.remove("build/owned/index.html")
thefile = "build/owned/index.html"
skel.headerwrite(thefile,"owned")
content = open(thefile,"a")
cards = []
for event in log.log:
for card in event["received"]:
cards.append(card)
cards = sorted(cards)
content.write("<h1>owned cards</h1>\n<p>")
for card in cards:
deck = card[:-2]
cardid = card[-2:]
content.write("<img src=\"/decks/" + deck + "/" + cardid + ".gif\" title=\"" + card + "\">")
content.write("</p>\n")
content.close()
skel.footerwrite(thefile)
if __name__ == "__main__":
ownedgen()