2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 22:27:20 +00:00

Make the logbook parser a little more sane

Move the parser to expo mapping to settings
Set a default parser
Iterate over the expo years rather than the mapping list!
This commit is contained in:
Sam Wenham
2019-03-06 23:20:34 +00:00
parent 59f8647e0f
commit 9fc80bed35
4 changed files with 155 additions and 98 deletions

View File

@@ -50,7 +50,7 @@ def LoadPersonsExpos():
header = dict(zip(headers, range(len(headers))))
# make expeditions
print "Loading expeditions"
print("Loading expeditions")
years = headers[5:]
for year in years:
@@ -61,7 +61,7 @@ def LoadPersonsExpos():
# make persons
print "Loading personexpeditions"
print("Loading personexpeditions")
#expoers2008 = """Edvin Deadman,Kathryn Hopkins,Djuke Veldhuis,Becka Lawson,Julian Todd,Natalie Uomini,Aaron Curtis,Tony Rooke,Ollie Stevens,Frank Tully,Martin Jahnke,Mark Shinwell,Jess Stirrups,Nial Peters,Serena Povia,Olly Madge,Steve Jones,Pete Harley,Eeva Makiranta,Keith Curtis""".split(",")
#expomissing = set(expoers2008)
@@ -127,7 +127,7 @@ def GetPersonExpeditionNameLookup(expedition):
res = { }
duplicates = set()
print "Calculating GetPersonExpeditionNameLookup for", expedition.year
print("Calculating GetPersonExpeditionNameLookup for " + expedition.year)
personexpeditions = models.PersonExpedition.objects.filter(expedition=expedition)
for personexpedition in personexpeditions:
possnames = [ ]