summaryrefslogtreecommitdiffstats
path: root/parsers/people.py
diff options
context:
space:
mode:
Diffstat (limited to 'parsers/people.py')
-rw-r--r--parsers/people.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/parsers/people.py b/parsers/people.py
index dd4d896..2d7c5b0 100644
--- a/parsers/people.py
+++ b/parsers/people.py
@@ -75,7 +75,8 @@ def troggle_slugify(longname):
slug = slug.replace('&', '') # otherwise just remove the &
slug = slug.replace(';', '') # otherwise just remove the ;
slug = re.sub(r'<[^>]*>','',slug) # remove <span-lang = "hu">
-
+ slug=slug.strip("-") # remove spare hyphens
+
if len(slug) > 40: # slugfield is 50 chars
slug = slug[:40]
if slug in slug_cache:
@@ -237,6 +238,13 @@ Gpersonexpeditionnamelookup = {}
def GetPersonExpeditionNameLookup(expedition):
"""Yes this should all be in an editable text file, not in the body of the code. Sorry.
+
+ This uses the existing database records of everone on an expedition to construct a dictionary
+ indexedby every possible pseudonym or alias that the person might be known by.
+
+ This dictionary is used when parsing logbooks and survex files to identify who is being
+ referred to, when the name written in the logbook is e.g. "Mike TA" == "Mike The Animal"
+ == "Mike Rickardson".
"""
global Gpersonexpeditionnamelookup