\n
\n
" + game["initialdate"].strftime("%Y-%m-%d") + "
\n
\n
\n"
try:
if game["firstplayed"]:
- cardstring += "
\n
" + game["firstplayed"].strftime("%Y-%m-%d") + "
\n
\n
\n"
+ try:
+ if game["firstplayed"] != game["beaten"]:
+ cardstring += "
\n
" + game["firstplayed"].strftime("%Y-%m-%d") + "
\n
\n
\n"
+ except:
+ cardstring += "
\n
" + game["firstplayed"].strftime("%Y-%m-%d") + "
\n
\n
\n"
except:
pass
try:
@@ -944,54 +953,53 @@ def history():
theyear = int(thisyear)
while theyear >= gamestartyear:
- yearlist = []
+ histlist = []
+ feedlist = []
enddate = datetime.strptime((str(theyear) + "-12-31"),"%Y-%m-%d")
startdate = datetime.strptime((str(theyear) + "-01-01"),"%Y-%m-%d")
eachdate = enddate
while eachdate >= startdate:
for game in games:
- try:
- if game["firstplayed"] == eachdate:
- try:
- if game["beat"] != eachdate:
- yearlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Started"})
- except:
- try:
- if game["completed"] != eachdate:
- yearlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Started"})
- except:
- yearlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Started"})
- except:
- pass
- if game["initialdate"] == eachdate:
- try:
- if game["beat"] != eachdate:
- yearlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Added"})
- except:
- try:
- if game["completed"] != eachdate:
- yearlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Added"})
- except:
- yearlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Added"})
try:
if game["gameplay"] == eachdate:
if game["firstplayed"] != eachdate:
- yearlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Playing"})
- except:
- pass
- try:
- if game["beaten"] == eachdate:
- yearlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Beat"})
+ feedlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Playing"})
except:
pass
try:
if game["completed"] == eachdate:
- yearlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Completed"})
+ histlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Completed"})
+ feedlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Completed"})
except:
pass
+ try:
+ if game["beaten"] == eachdate:
+ histlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Beat"})
+ feedlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Beat"})
+ except:
+ pass
+ try:
+ if game["firstplayed"] == eachdate:
+ try:
+ if game["beaten"] != eachdate:
+ histlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Started"})
+ feedlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Started"})
+ except:
+ try:
+ if game["completed"] != eachdate:
+ histlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Started"})
+ feedlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Started"})
+ except:
+ histlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Started"})
+ feedlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Started"})
+ except:
+ pass
+ if game["initialdate"] == eachdate:
+ histlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Added"})
+ feedlist.append({"date":eachdate,"name":game["name"],"console":game["console"],"action":"Added"})
eachdate -= timedelta(days=1)
checkdate = enddate
- for event in yearlist:
+ for event in histlist:
filewrite.write("
\n")
if checkdate != event["date"]:
filewrite.write("
" + event["date"].strftime("%Y-%m-%d") + "
\n")
@@ -1003,8 +1011,11 @@ def history():
else:
filewrite.write("Started")
else:
- filewrite.write(event["action"])
+ filewrite.write(event["action"])
filewrite.write("\">\n