From 07bde0ae9bb67b60ee3c7c52a6e990cb00e27260 Mon Sep 17 00:00:00 2001
From: Philip Sargent This is a pretty much complete list of all the personnel on %d CUCC
expeditions (there was no expo in 1986), together with the total number of
expeditions each has attended and the total number of people on each expedition.'
- if expos_caving == 0: output += ''
-
- # Middle names still not working: MorvenBeranek-Stanley , Sarah Livia Zerbes
- # Need to manage names e.g. Leif Hornsved (Nickname) => LeifHornsved
- namevis = name.replace('""', '"').strip('"')
- # Need to manage e.g.Olaf Kähler
- # Need to manage e.g. Bal%26aacute%3BzsIzapy
- nameurl = namevis.replace(' ', '')
- nameurl = nameurl.replace('&', '%26')
- nameurl = nameurl.replace(';', '%3B')
- nameurl = re.sub('<[^>]*>','',nameurl)
- nameurl = re.sub('\([^\)]*\)','',nameurl) # mostly noit needed, but is for Wookey
- namelink= "" + namevis + ""
- output += namelink
- #output += name.replace('""', '"')
-
- if expos_caving == 0: output += ''
- output += ' '
- if guest: output += '§'
- output += ' '
- if vfho: output += '¤'
- output += ' '
- if mug:
- if not (os.path.isfile(mug)):
- print >> sys.stderr, "ERROR: --------------- mug file does not exist: ", mug
- if mug: output += '' % mug
- output += ' '
- for y in xrange(len(years)):
- if(years[y]):
- m = str(76 + y)[-2:]
- if(years[y]=='-1'):
- m = ''+ m + ''
- else:
- try:
- headcounts_byyear[y] += 1
- except IndexError:
- sys.stderr.write(repr(r) +":::"+ str(y) + "\n")
- raise
- output += '' + m + ' '
- else:
- output += ''
+ r = r.replace("\n","")
+ r = r.replace("\r", "")
+ cells = r.split(",") # chomp newline
+ (name, surname, guest, vfho, mug) = cells[:5]
+ years = cells[5:]
+ 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):
+ sys.stderr.write("Error processing " + name + ". No attendances found\n")
+ sys.exit(1)
+ if(expos_caving and name != 'Rover Richardson' and name != 'Bier Tent'): headcount += 1
+ if mug: pics +=1
+ output += ' \n'
- recordholders.append((expos_caving, name))
+ recordholders.append((expos_caving, name))
def collapse(m):
- n = (m.span()[1]-m.span()[0]) / 9
- if(n == 1): return m.group()
- else: return ''
+ if expos_caving == 0: output += ''
+
+ # Middle names still not working: MorvenBeranek-Stanley , Sarah Livia Zerbes
+ # Need to manage names e.g. Leif Hornsved (Nickname) => LeifHornsved
+ namevis = name.replace('""', '"').strip('"')
+ # Need to manage e.g.Olaf Kähler
+ # Need to manage e.g. Bal%26aacute%3BzsIzapy
+ nameurl = namevis.replace(' ', '')
+ nameurl = nameurl.replace('&', '%26')
+ nameurl = nameurl.replace(';', '%3B')
+ nameurl = re.sub('<[^>]*>','',nameurl)
+ nameurl = re.sub('\([^\)]*\)','',nameurl) # mostly noit needed, but is for Wookey
+ namelink= "" + namevis + ""
+ output += namelink
+ #output += name.replace('""', '"')
+
+ if expos_caving == 0: output += ''
+ output += ' '
+ if guest: output += '§'
+ output += ' '
+ if vfho: output += '¤'
+ output += ' '
+ if mug:
+ if not (os.path.isfile(mug)):
+ print("ERROR: --------------- mug file does not exist: ", mug, file=sys.stderr)
+ if mug: output += '' % mug
+ output += ' '
+ for y in range(len(years)):
+ if(years[y]):
+ m = str(76 + y)[-2:]
+ if(years[y]=='-1'):
+ m = ''+ m + ''
+ else:
+ try:
+ headcounts_byyear[y] += 1
+ except IndexError:
+ sys.stderr.write(repr(r) +":::"+ str(y) + "\n")
+ raise
+ output += '' + m + ' '
+ else:
+ output += ''
# print number of expos, non-caving in red. Only print numbers > 0
- output += ' '
- if(expos_notcaving):
+ output += ' '
+ if(expos_notcaving):
if(expos_caving):
output += '%d+%d' % (expos_caving, expos_notcaving)
else:
output += '%d' % expos_notcaving
- else:
- output += '%d' % expos_caving
+ else:
+ output += '%d' % expos_caving
output += ' ' % n
+ n = (m.span()[1]-m.span()[0]) / 9
+ if(n == 1): return m.group()
+ else: return ' ' % n
#output = re.sub(r'( )+',collapse, output)
@@ -96,9 +96,9 @@ lastyear=1976+1+len([t for t in headcounts_byyear if t > 0]) # no expo in 1986
# moved to main.css
#
@@ -117,9 +117,9 @@ table.fancy td.nonempty { background: #eee }
CUCC members and guests in Austria 1976 to %s
-""" % lastyear
+""" % lastyear)
-print """
+print("""
Links to recent expos: last year
Expo head count | ", +print("||||||
Expo head count | ", end=' ') for y in headcounts_byyear: - print '%d | ' % y, + print('%d | ' % y, end=' ') -print """ +print("""
Although few take such statistics seriously, the most dedicated expoers are """ % (headcount, pics) +
Although few take such statistics seriously, the most dedicated expoers are """ % (headcount, pics)) recordholders.sort() recordholders.reverse() k = 2 while recordholders[k + 1][0] == recordholders[k][0]: - k = k + 1 -print "%s (%d expos)," % (recordholders[0][1],recordholders[0][0]) + k = k + 1 +print("%s (%d expos)," % (recordholders[0][1],recordholders[0][0])) for r in recordholders[1:k]: - print "%s (%d)," % (r[1],r[0]), + print("%s (%d)," % (r[1],r[0]), end=' ') -print """and %s (%d). Julian Todd holds the record for consecutive +print("""and %s (%d). Julian Todd holds the record for consecutive expo attendance (10), (along with Mark Shinwell, but he didn't actually -go caving on all of those visits). A more obscure record of longest gap between expos has been held by various people since 2004 at 13, and then 17, years, but in 2017 was upped to 34 years by Phil Sargent, which is going to be extremely hard to beat!
""" % (recordholders[k][1],recordholders[k][0]) +go caving on all of those visits). A more obscure record of longest gap between expos has been held by various people since 2004 at 13, and then 17, years, but in 2017 was upped to 34 years by Phil Sargent, which is going to be extremely hard to beat!""" % (recordholders[k][1],recordholders[k][0])) -print """Outside-expo caving happens from time to time, with Becka Lawson, Neil Pacey, Julian Todd and Wookey +print("""
Outside-expo caving happens from time to time, with Becka Lawson, Neil Pacey, Julian Todd and Wookey joining various Arge and VfHO trips since about 2000. However, the much talked-about winter expedition/holiday has still not happened, though there is still a lot to be said for it. With draughts reversed in the cold, top entrances should @@ -201,4 +201,4 @@ remain open all winter.