import datetime,os import log,skel def indexgen(): if os.path.exists("build/index.html"): os.remove("build/index.html") thefile = "build/index.html" skel.headerwrite(thefile,"index") content = open(thefile,"a") cardstotal = 0 for event in log.log: try: cardstotal += len(event["received"]) except: pass firstdate = log.log[0]["date"] content.write("
" + firstdate.strftime("%Y-%m-%d") + "