import datetime,os import log,skel,tcgcore,variables def tradegen(): if not os.path.isdir("build/trade"): os.mkdir("build/trade") if os.path.exists("build/trade/index.html"): os.remove("build/trade/index.html") thefile = "build/trade/index.html" skel.headerwrite(thefile,"trade") content = open(thefile,"a") content.write("
") for card in tcgcore.ownedcards(): if card[0:4] != "sig_": if not tcgcore.collecting(card[:-2]): content.write(tcgcore.printcard(card)) siglist = [] for card in tcgcore.ownedcards(): if card == "sig_" + variables.name.lower(): siglist.append(card) if variables.keepsig == True: siglist.remove(siglist[0]) for sig in siglist: content.write(tcgcore.printcard(sig)) content.write("
\nTrade cards here
\n") content.close() skel.footerwrite(thefile) if __name__ == "__main__": tradegen()