mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
matching fix for db import to match folklist parser
This commit is contained in:
parent
dfdf21459a
commit
af414396d6
@ -75,6 +75,7 @@ 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]
|
||||
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user