mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2025-12-08 23:04:35 +00:00
folk updated ready for 2021 season
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
import sys, string, re, os
|
||||
from datetime import date
|
||||
|
||||
# run within the /folk/ folder:
|
||||
# python ../scripts/make-folklist.py <folk.csv >index.htm
|
||||
@@ -16,7 +17,7 @@ output = ""
|
||||
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","")
|
||||
@@ -43,7 +44,7 @@ for r in lines[1:]:
|
||||
nameurl = nameurl.replace('&', '%26')
|
||||
nameurl = nameurl.replace(';', '%3B')
|
||||
nameurl = re.sub('<[^>]*>','',nameurl)
|
||||
nameurl = re.sub('\([^\)]*\)','',nameurl) # mostly noit needed, but is for Wookey
|
||||
nameurl = re.sub('\([^\)]*\)','',nameurl) # mostly not needed, but is for Wookey
|
||||
namelink= "<a href='/person/" + nameurl + "'>" + namevis + "</a>"
|
||||
output += namelink
|
||||
#output += name.replace('""', '"')
|
||||
@@ -92,7 +93,7 @@ def collapse(m):
|
||||
|
||||
#output = re.sub(r'(<td></td>)+',collapse, output)
|
||||
|
||||
lastyear=1976+1+len([t for t in headcounts_byyear if t > 0]) # no expo in 1986
|
||||
lastyear=1976+1+len([t for t in headcounts_byyear if t > 0]) # no expo in 1986 or 2020
|
||||
|
||||
# moved to main.css
|
||||
#<style type="text/css">
|
||||
@@ -117,11 +118,11 @@ table.fancy td.nonempty { background: #eee }
|
||||
|
||||
<!-- DO NOT EDIT THIS DOCUMENT BY HAND! It is automatically generated by "scripts/make-folklist.py" -->
|
||||
<h1>CUCC members and guests in Austria</br> 1976 to %s</h1>
|
||||
""" % lastyear)
|
||||
""" % yearnow)
|
||||
|
||||
print("""
|
||||
<p>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 (there were no expos in 1986 or 2020), together with the total number of
|
||||
expeditions each has attended and the total number of people on each expedition.</p>
|
||||
|
||||
<p>Qualification for inclusion involves some active contribution to the
|
||||
@@ -155,7 +156,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">last year</a>
|
||||
<p>Links to recent expos: <a href="http://expo.survex.com/expedition/%s">previous expo</a>
|
||||
<hr /><table class="fancy">
|
||||
""" % y1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user