Fix more off-by-ones chopping off names and update records section

This commit is contained in:
Wookey 2016-04-20 04:19:10 +01:00
parent 37932d07c2
commit 1cb8ca2d52

View File

@ -48,10 +48,16 @@ for r in lines[1:]:
output += '<td class="nonempty">' + m + '</td>' output += '<td class="nonempty">' + m + '</td>'
else: else:
output += '<td></td>' output += '<td></td>'
# print number of expos, non-caving in red. Only print numbers > 0
output += '<td style="text-align: right">'
if(expos_notcaving): if(expos_notcaving):
output += '<td style="text-align: right">%d + <span class="didntcave">%d</span></td></tr>\n' % (expos_caving, expos_notcaving) if(expos_caving):
output += '%d + <span class="didntcave">%d</span>' % (expos_caving, expos_notcaving)
else: else:
output += '<td style="text-align: right">%d</td></tr>\n' % expos_caving output += '<span class="didntcave">%d</span>' % expos_notcaving
else:
output += '%d' % expos_caving
output += '</td></tr>\n'
recordholders.append((expos_caving, name)) recordholders.append((expos_caving, name))
def collapse(m): def collapse(m):
@ -138,15 +144,17 @@ recordholders.reverse()
k = 2 k = 2
while recordholders[k + 1][0] == recordholders[k][0]: while recordholders[k + 1][0] == recordholders[k][0]:
k = k + 1 k = k + 1
print "%s (%d expos)," % (recordholders[0][1][1:-1],recordholders[0][0]) print "%s (%d expos)," % (recordholders[0][1],recordholders[0][0])
for r in recordholders[1:k]: for r in recordholders[1:k]:
print "%s (%d)," % (r[1][1:-1],r[0]), print "%s (%d)," % (r[1],r[0]),
print """and %s (%d). Mark Shinwell holds the record for consecutive print """and %s (%d). Mark Shinwell holds the record for consecutive
expo attendance (10), but didn't actually go caving on all those, so expo attendance (10), but didn't actually go caving on all those, so
this record arguably falls to Julian Haines and Brian Outram (9 each). this record arguably falls to Julian Haines and Brian Outram (9 each).
A more obscure record was set by Juliet Morse in 2010: longest A more obscure record was set by Wadders in 2015: longest interval
interval between expos (14 years).""" % (recordholders[k][1][1:-1],recordholders[k][0]) between expos (17 years), except that he didn't actually go underground,
so it may be shared by Mark Dougherty, Juliet Morse and Chris Densham,
who have all returned after gaps of 13 years</p>""" % (recordholders[k][1],recordholders[k][0])
print """<p>Outside-expo caving has started, with Becka Lawson, Neil Pacey, Julian Todd and Wookey print """<p>Outside-expo caving has started, with Becka Lawson, Neil Pacey, Julian Todd and Wookey