Expo 2022 new year

This commit is contained in:
Philip Sargent
2021-12-01 21:59:56 +00:00
parent 96372650c9
commit dac68c39ea
9 changed files with 483 additions and 460 deletions

View File

@@ -13,18 +13,25 @@ pics = 0
allyears = 0
recordholders = []
output = ""
n = 0
lines = sys.stdin.readlines()
headcounts_byyear = [0]*(len(lines[0].split(","))-5)
yearnow = date.today().year
for r in lines[1:]:
r = r.replace("\n","")
r = r.replace("\r", "")
cells = r.split(",") # chomp newline
(name, surname, guest, vfho, mug) = cells[:5]
years = cells[5:]
n +=1
try:
r = r.replace("\n","")
r = r.replace("\r", "")
cells = r.split(",") # chomp newline
(name, surname, guest, vfho, mug) = cells[:5]
years = cells[5:]
except:
print(f'Exception in line {n}: {r}')
expos_caving = len([t for t in years if t == "1"])
expos_notcaving = len([t for t in years if t == "-1"])
if(expos_caving == 0 and expos_notcaving == 0):
@@ -156,7 +163,7 @@ src="i/mug.png" /></a>.</p>
y2 = lastyear-2
y1 = lastyear-1
print("""
<p>Links to recent expos: <a href="http://expo.survex.com/expedition/%s">previous expo</a>
<p>Links to recent expos: <a href="http://expo.survex.com/expedition/%s">previous expo</a>. There was no expo in 1986, 2020 or 2021.
<hr /><table class="fancy">
""" % y1)