mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 22:47:03 +00:00
Cope with ARGE people
This commit is contained in:
@@ -58,7 +58,7 @@ LOGBOOKS_DIR = "years" # subfolder of settings.EXPOWEB
|
|||||||
|
|
||||||
ENTRIES = {
|
ENTRIES = {
|
||||||
"2023": 53,
|
"2023": 53,
|
||||||
"2022": 90,
|
"2022": 93,
|
||||||
"2019": 55,
|
"2019": 55,
|
||||||
"2018": 95,
|
"2018": 95,
|
||||||
"2017": 74,
|
"2017": 74,
|
||||||
@@ -128,12 +128,22 @@ def GetTripPersons(trippeople, expedition, logtime_underground, tid=None):
|
|||||||
tripperson = re.sub(rx_round_bracket, "", tripperson).strip()
|
tripperson = re.sub(rx_round_bracket, "", tripperson).strip()
|
||||||
|
|
||||||
# Whacky aliases all handled in GetPersonExpeditionNameLookup()
|
# Whacky aliases all handled in GetPersonExpeditionNameLookup()
|
||||||
|
try:
|
||||||
personyear = GetPersonExpeditionNameLookup(expedition).get(tripperson.lower())
|
personyear = GetPersonExpeditionNameLookup(expedition).get(tripperson.lower())
|
||||||
if not personyear:
|
if not personyear:
|
||||||
message = f" ! - {expedition.year} No name match for: '{tripperson}' in entry {tid=} for this expedition year."
|
if known_foreigner(tripperson):
|
||||||
|
message = f" ! - {expedition.year} Known foreigner: '{tripperson}' in entry {tid=}"
|
||||||
|
print(message)
|
||||||
|
else:
|
||||||
|
message = f" ! - {expedition.year} No name match for: '{tripperson}' in entry {tid=} for this year."
|
||||||
print(message)
|
print(message)
|
||||||
DataIssue.objects.create(parser="logbooks", message=message)
|
DataIssue.objects.create(parser="logbooks", message=message)
|
||||||
res.append((personyear, logtime_underground))
|
res.append((personyear, logtime_underground))
|
||||||
|
except:
|
||||||
|
message = f" ! - {expedition.year} EXCEPTION: '{tripperson}' in entry {tid=} for this year."
|
||||||
|
print(message)
|
||||||
|
DataIssue.objects.create(parser="logbooks", message=message)
|
||||||
|
raise
|
||||||
if author_u:
|
if author_u:
|
||||||
author = personyear
|
author = personyear
|
||||||
else:
|
else:
|
||||||
@@ -175,7 +185,7 @@ def tidy_trip_persons(trippeople, title, expedition, logtime_underground, tid):
|
|||||||
DataIssue.objects.create(parser="logbooks", message=message)
|
DataIssue.objects.create(parser="logbooks", message=message)
|
||||||
print(message)
|
print(message)
|
||||||
# raise
|
# raise
|
||||||
return
|
return "", ""
|
||||||
|
|
||||||
if not author:
|
if not author:
|
||||||
message = f" ! - {expedition.year} Warning: logentry: {title} - no expo member author for entry '{tid}'"
|
message = f" ! - {expedition.year} Warning: logentry: {title} - no expo member author for entry '{tid}'"
|
||||||
|
|||||||
@@ -160,7 +160,10 @@ foreign_friends = [
|
|||||||
|
|
||||||
|
|
||||||
def known_foreigner(id):
|
def known_foreigner(id):
|
||||||
"""If this someone from ARGE or a known Austrian? Name has to be exact, no soft matching"""
|
"""If this someone from ARGE or a known Austrian? Name has to be exact, no soft matching
|
||||||
|
|
||||||
|
APPARENTLY NOT YET USED
|
||||||
|
instead foreigners have names prefixed by * in the logbook.html ?"""
|
||||||
global foreign_friends
|
global foreign_friends
|
||||||
|
|
||||||
if id in foreign_friends:
|
if id in foreign_friends:
|
||||||
|
|||||||
Reference in New Issue
Block a user