Compare commits
No commits in common. "35b203cc31c42fde75ebc060889073be9bf65ff5" and "078a1601fa89880ffd9b46e6f2ea76958b666ccc" have entirely different histories.
35b203cc31
...
078a1601fa
@ -141,10 +141,6 @@ for myaccount in accounts:
|
|||||||
mycoverurl = mybook['resource']['coverUrl']['small']
|
mycoverurl = mybook['resource']['coverUrl']['small']
|
||||||
except:
|
except:
|
||||||
mycoverurl = ''
|
mycoverurl = ''
|
||||||
try:
|
|
||||||
myresourceid=mybook['resource']['id']
|
|
||||||
except:
|
|
||||||
myresourceid=''
|
|
||||||
duedate = datetime.datetime.strptime(mybook['dueDate'].split('T')[0],'%Y-%m-%d').date()
|
duedate = datetime.datetime.strptime(mybook['dueDate'].split('T')[0],'%Y-%m-%d').date()
|
||||||
if datetime.date.today() > duedate:
|
if datetime.date.today() > duedate:
|
||||||
overdue=True
|
overdue=True
|
||||||
@ -157,7 +153,7 @@ for myaccount in accounts:
|
|||||||
datetime.datetime.strptime(mybook['checkOutDate'].split('T')[0],'%Y-%m-%d').date(),
|
datetime.datetime.strptime(mybook['checkOutDate'].split('T')[0],'%Y-%m-%d').date(),
|
||||||
duedate,
|
duedate,
|
||||||
mybook['vendor'],
|
mybook['vendor'],
|
||||||
myresourceid,
|
mybook['resource']['id'],
|
||||||
mybook['resource']['title'],
|
mybook['resource']['title'],
|
||||||
mybook['resource']['materialType'],
|
mybook['resource']['materialType'],
|
||||||
mycoverurl,
|
mycoverurl,
|
||||||
@ -203,14 +199,9 @@ returntable += """<form action="https://librarynotice.hamik.net/refresh.php">
|
|||||||
td="</td><td>"
|
td="</td><td>"
|
||||||
th="</th><th>"
|
th="</th><th>"
|
||||||
#returntable = '<a href="https://librarynotice.hamik.net">Click to return to main list</a>'
|
#returntable = '<a href="https://librarynotice.hamik.net">Click to return to main list</a>'
|
||||||
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Name'+ th +'Count</th></tr>'
|
|
||||||
for account in accounts:
|
|
||||||
accountcount = sum(b.person == account.person for b in allbooks)
|
|
||||||
if accountcount >0:
|
|
||||||
returntable += "<tr><td>" + account.person + td + str(accountcount) + "</td></tr>"
|
|
||||||
duesoon = [d for d in allbooks if (d.duedate < datetime.date.today() + datetime.timedelta(days=10)) and not (str(d.renewresult).lower() == 'None'.lower())]
|
duesoon = [d for d in allbooks if (d.duedate < datetime.date.today() + datetime.timedelta(days=10)) and not (str(d.renewresult).lower() == 'None'.lower())]
|
||||||
if len(duesoon) >=1:
|
if len(duesoon) >=1:
|
||||||
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Type'+ th +'Count</th></tr>'
|
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Name'+ th +'Count</th></tr>'
|
||||||
for type in mediatypes:
|
for type in mediatypes:
|
||||||
typecount = sum(b.materialtype == type for b in duesoon)
|
typecount = sum(b.materialtype == type for b in duesoon)
|
||||||
if typecount>0:
|
if typecount>0:
|
||||||
@ -226,7 +217,7 @@ returnlist = [d for d in allbooks if (d.renewalcount == 3)]
|
|||||||
if len(returnlist) == 0:
|
if len(returnlist) == 0:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Type'+ th +'Count</th></tr>'
|
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Name'+ th +'Count</th></tr>'
|
||||||
for type in mediatypes:
|
for type in mediatypes:
|
||||||
typecount = sum(b.materialtype == type for b in returnlist)
|
typecount = sum(b.materialtype == type for b in returnlist)
|
||||||
if typecount>0:
|
if typecount>0:
|
||||||
@ -242,7 +233,7 @@ returnlist = [d for d in allbooks if (d.renewalcount == 2)]
|
|||||||
if len(returnlist) == 0:
|
if len(returnlist) == 0:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Type'+ th +'Count</th></tr>'
|
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Name'+ th +'Count</th></tr>'
|
||||||
for type in mediatypes:
|
for type in mediatypes:
|
||||||
typecount = sum(b.materialtype == type for b in returnlist)
|
typecount = sum(b.materialtype == type for b in returnlist)
|
||||||
if typecount>0:
|
if typecount>0:
|
||||||
@ -258,7 +249,7 @@ returnlist = [d for d in allbooks if (d.renewalcount == 1)]
|
|||||||
if len(returnlist) == 0:
|
if len(returnlist) == 0:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Type'+ th +'Count</th></tr>'
|
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Name'+ th +'Count</th></tr>'
|
||||||
for type in mediatypes:
|
for type in mediatypes:
|
||||||
typecount = sum(b.materialtype == type for b in returnlist)
|
typecount = sum(b.materialtype == type for b in returnlist)
|
||||||
if typecount>0:
|
if typecount>0:
|
||||||
@ -274,7 +265,7 @@ returnlist = [d for d in allbooks if (d.renewalcount == 0)]
|
|||||||
if len(returnlist) == 0:
|
if len(returnlist) == 0:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Type'+ th +'Count</th></tr>'
|
returntable += tablestart + '<colgroup><col/><col/></colgroup><tr><th>Name'+ th +'Count</th></tr>'
|
||||||
for type in mediatypes:
|
for type in mediatypes:
|
||||||
typecount = sum(b.materialtype == type for b in returnlist)
|
typecount = sum(b.materialtype == type for b in returnlist)
|
||||||
if typecount>0:
|
if typecount>0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user