diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2022-10-07 23:47:05 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2022-10-07 23:47:05 +0300 |
commit | f51d1e114e57d652025d5e0630c22dbc85eb4707 (patch) | |
tree | 6e55eb466b9e441e53d50af8948a6639780cabd9 /parsers/people.py | |
parent | c76cd38d76d40ce1aff907ccd646e1efd279c59f (diff) | |
download | troggle-f51d1e114e57d652025d5e0630c22dbc85eb4707.tar.gz troggle-f51d1e114e57d652025d5e0630c22dbc85eb4707.tar.bz2 troggle-f51d1e114e57d652025d5e0630c22dbc85eb4707.zip |
small chnages to name resolution
Diffstat (limited to 'parsers/people.py')
-rw-r--r-- | parsers/people.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/parsers/people.py b/parsers/people.py index 2de8e02..6ae9c2b 100644 --- a/parsers/people.py +++ b/parsers/people.py @@ -129,6 +129,11 @@ def load_people_expos(): # used in other referencing parser functions # expedition name lookup cached for speed (it's a very big list) +# should have a LIST of nicknames, just populate the first entry from folk.csv + +# Refactor. The dict GetPersonExpeditionNameLookup(expo) indexes by name and has values of personexpedition +# This is convoluted, the whole personexpedition concept is unnecessary. + Gpersonexpeditionnamelookup = { } def GetPersonExpeditionNameLookup(expedition): global Gpersonexpeditionnamelookup @@ -151,14 +156,15 @@ def GetPersonExpeditionNameLookup(expedition): possnames.append(f + " " + l[0]) possnames.append(f + l[0]) possnames.append(f[0] + " " + l) + possnames.append(f[0] + l[0]) # initials e.g. gb or bl possnames.append(f) if full not in possnames: possnames.append(full) if personexpedition.nickname not in possnames: possnames.append(personexpedition.nickname.lower()) if l: - # This allows for nickname to be used for short name eg Phil - # adding Phil Sargent to the list + # This allows for nickname to be used for short name + # eg Phil S is adding Phil Sargent to the list if str(personexpedition.nickname.lower() + " " + l) not in possnames: possnames.append(personexpedition.nickname.lower() + " " + l) if str(personexpedition.nickname.lower() + " " + l[0]) not in possnames: |