Add trading page
parent
18422d8b4f
commit
fc81853bc1
@ -0,0 +1,22 @@
|
|||||||
|
import datetime,os
|
||||||
|
import log,skel,tcgcore
|
||||||
|
|
||||||
|
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("<h1>available for trade</h1>\n<p>")
|
||||||
|
for card in tcgcore.ownedcards():
|
||||||
|
if card[0:4] != "sig_":
|
||||||
|
if not tcgcore.collecting(card[:-2]):
|
||||||
|
content.write(tcgcore.printcard(card))
|
||||||
|
content.write("</p>\n")
|
||||||
|
content.close()
|
||||||
|
skel.footerwrite(thefile)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
tradegen()
|
Loading…
Reference in New Issue