summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-10-12 23:10:48 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-10-12 23:10:48 +0300
commit45f06293f5917f0da7c85e74ddb1ae09b997705e (patch)
tree6e6fabdb5debb58b043c645f854c49e094c0e278
parent004a3e2db1a5de58c81797e8a504a63d8c35f53b (diff)
downloadtroggle-45f06293f5917f0da7c85e74ddb1ae09b997705e.tar.gz
troggle-45f06293f5917f0da7c85e74ddb1ae09b997705e.tar.bz2
troggle-45f06293f5917f0da7c85e74ddb1ae09b997705e.zip
Add 'foreign friends' to names alias list
-rw-r--r--core/views/statistics.py7
-rw-r--r--parsers/people.py17
-rw-r--r--templates/aliases.html10
3 files changed, 25 insertions, 9 deletions
diff --git a/core/views/statistics.py b/core/views/statistics.py
index 56517d7..c22d1a4 100644
--- a/core/views/statistics.py
+++ b/core/views/statistics.py
@@ -15,7 +15,7 @@ from django.utils import timezone
from troggle.core.models.troggle import Expedition, Person, PersonExpedition, DataIssue
from troggle.core.models.caves import Cave, LogbookEntry, Entrance
from troggle.core.models.survex import SurvexBlock, SurvexStation
-from troggle.parsers.people import GetPersonExpeditionNameLookup
+from troggle.parsers.people import GetPersonExpeditionNameLookup, foreign_friends
import troggle.settings as settings
@@ -176,12 +176,14 @@ def eastings(request):
def aliases(request, year):
'''Page which displays a list of all the person aliases in a specific year
'''
+
if not year:
year = 1998
expo = Expedition.objects.filter(year=year)[0] # returns a set, even though we know there is only one
personexpeditions = PersonExpedition.objects.filter(expedition=expo)
persons = list(Person.objects.all().order_by('last_name'))
+
aliases = GetPersonExpeditionNameLookup(expo)
aliasdict={}
@@ -190,4 +192,5 @@ def aliases(request, year):
invert ={}
- return render(request,'aliases.html', {'year': year, 'aliasdict': aliasdict, 'invert': invert,'personexpeditions': personexpeditions, 'persons': persons})
+ return render(request,'aliases.html', {'year': year, 'aliasdict': aliasdict,
+ 'foreign_friends': foreign_friends, 'invert': invert,'personexpeditions': personexpeditions, 'persons': persons})
diff --git a/parsers/people.py b/parsers/people.py
index 0f3a66e..83d656c 100644
--- a/parsers/people.py
+++ b/parsers/people.py
@@ -133,17 +133,20 @@ def who_is_this(year,possibleid):
return personexpedition.person
else:
return None
-
-def known_foreigner(id):
- '''If this someone from ARGE or a known Austrian? Name has to be exact, no soft matching
- '''
- friends = ["P. Jeutter", "K. Jäger", "S. Steinberger", "R. Seebacher",
+
+global foreign_friends
+foreign_friends = ["P. Jeutter", "K. Jäger", "S. Steinberger", "R. Seebacher",
"Dominik Jauch", "Fritz Mammel", "Marcus Scheuerman",
"Uli Schütz", "Wieland Scheuerle",
"Kai Schwekend", "Regina Kaiser", "Thilo Müller","Wieland Scheuerle",
- "Florian Gruner", "Helmut Stopka-Ebeler", "Aiko", "Mark Morgan"]
+ "Florian Gruner", "Helmut Stopka-Ebeler", "Aiko", "Mark Morgan", "Arndt Karger"]
+
+def known_foreigner(id):
+ '''If this someone from ARGE or a known Austrian? Name has to be exact, no soft matching
+ '''
+ global foreign_friends
- if id in friends:
+ if id in foreign_friends:
return True
else:
return False
diff --git a/templates/aliases.html b/templates/aliases.html
index 9ad50e0..f8f2bf5 100644
--- a/templates/aliases.html
+++ b/templates/aliases.html
@@ -60,6 +60,16 @@ is used in the table above to construct possible unambiguous identifiers.
{% endfor %}
</table>
+<p>And these are people known to us, who appear as survex *team members or in logbook participant lists, but are not expo members
+and so are not managed or reported:
+{% for p in foreign_friends %}
+<tr>
+ <td><b>{{p}},</b></td>
+</tr>
+{% endfor %}
+</table>
+
+
<p>Don't blame me [programmer] for this, it's just what you all have collectively done over the decades by using this absurd variety of short-form
name formats when you have entered the cave data.
<p>The code that does this is in <var>troggle/parsers/people.py</var>.