From adbc8f79557ba7ffef018ac43010b3cfe3b642d9 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Wed, 4 Oct 2023 22:23:26 +0300 Subject: [PATCH] disambiguating names on wallets --- core/views/scans.py | 4 ++++ parsers/people.py | 12 ++++++++++++ templates/cavewallets.html | 2 +- templates/expedition.html | 1 + templates/personwallets.html | 2 +- templates/yearwallets.html | 2 +- 6 files changed, 20 insertions(+), 3 deletions(-) diff --git a/core/views/scans.py b/core/views/scans.py index 2f3d811..83f74fe 100644 --- a/core/views/scans.py +++ b/core/views/scans.py @@ -29,6 +29,10 @@ manywallets dict. TODO cave for a wallet - just gets the last one, randomly. SHould make this a list or many:many ideally + +-- add the participants on an explicit wallet list to .slugpeople so that they get proper URL-linked +on the per-person wallet report, and do the same thing for per-cave and per-year wallet reports + add this file in to the todo list thinggy. """ diff --git a/parsers/people.py b/parsers/people.py index 0e4ca30..24e8378 100644 --- a/parsers/people.py +++ b/parsers/people.py @@ -196,6 +196,7 @@ foreign_friends = [ "K. Jäger", "Kai Schwekend", "Karl Gaisberger", + "Marcus Scheuermann", "Marcus Scheuerman", "Mark Morgan", "P. Jeutter", @@ -279,6 +280,11 @@ def GetPersonExpeditionNameLookup(expedition): if n: possnames += apply_variations(n, l) + if f == "Adeleide".lower(): + possnames += apply_variations("Adelaide", l) + if f == "Adelaide".lower(): + possnames += apply_variations("Adeleide", l) + if f == "Robert".lower(): possnames += apply_variations("Bob", l) if f == "Rob".lower(): @@ -303,6 +309,7 @@ def GetPersonExpeditionNameLookup(expedition): possnames += apply_variations("Andy", l) if f == "Andy".lower(): possnames += apply_variations("Andrew", l) + if f == "Michael".lower(): possnames += apply_variations("Mike", l) @@ -316,6 +323,11 @@ def GetPersonExpeditionNameLookup(expedition): if f == "Pete".lower(): possnames += apply_variations("Peter", l) + if f == "Tobias".lower(): + possnames += apply_variations("Toby", l) + if f == "Toby".lower(): + possnames += apply_variations("Tobias", l) + if f == "Olly".lower(): possnames += apply_variations("Oliver", l) if f == "Oliver".lower(): diff --git a/templates/cavewallets.html b/templates/cavewallets.html index a24dcf2..3f88def 100644 --- a/templates/cavewallets.html +++ b/templates/cavewallets.html @@ -31,7 +31,7 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c {% if wallet.walletdate %}{{wallet.walletdate}}{% else %} {% endif %} {% if wallet.name %}{{wallet.name|truncatechars:20}}{% else %}{% if wallet.displaynames %} {% for dn in wallet.displaynames %}{{dn}}{%if not forloop.last %}, {% endif %} {% endfor %}{% else %} {% endif %}{% endif %} - {% if wallet.slugpeople %}{%for p in wallet.slugpeople%}{{p.fullname}}{%if not forloop.last %}, {% endif %}{% endfor %}{% else %}{{wallet.persons }}{% endif %} + {% if wallet.slugpeople %}{%for p in wallet.slugpeople%}{{p.fullname}}{%if not forloop.last %}, {% endif %}{% endfor %}{% else %}{{wallet.persons }}{% endif %} {{wallet.singlescan_set.all|length}} {% for survexblock in wallet.survexblock_set.all %} diff --git a/templates/expedition.html b/templates/expedition.html index c3685e4..46fb548 100644 --- a/templates/expedition.html +++ b/templates/expedition.html @@ -22,6 +22,7 @@
  • documentation index for this Expo
  • wallet completion status for this Expo
  • full logbook for this Expo +
  • alias names for this Expo {% if logged_in %}

    Reparse and reload this year's logbook by clicking here: RELOAD {% endif %} diff --git a/templates/personwallets.html b/templates/personwallets.html index 5575835..251ded6 100644 --- a/templates/personwallets.html +++ b/templates/personwallets.html @@ -30,7 +30,7 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c {% if wallet.walletdate %}{{wallet.walletdate}}{% else %} {% endif %} {% if wallet.name %}{{wallet.name|truncatechars:20}}{% else %}{% if wallet.displaynames %} {% for dn in wallet.displaynames %}{{dn}}{%if not forloop.last %}, {% endif %} {% endfor %}{% else %} {% endif %}{% endif %} - {% if wallet.slugpeople %}{%for p in wallet.slugpeople%}{{p.fullname}}{%if not forloop.last %}, {% endif %}{% endfor %}{% else %}{{wallet.persons }}{% endif %} + {% if wallet.slugpeople %}{%for p in wallet.slugpeople%}{{p.fullname}}{%if not forloop.last %}, {% endif %}{% endfor %}{% else %}{{wallet.persons }}{% endif %} {% if wallet.cave %} {% if wallet.caveobj.slug %} diff --git a/templates/yearwallets.html b/templates/yearwallets.html index 3af47a0..61d5bf2 100644 --- a/templates/yearwallets.html +++ b/templates/yearwallets.html @@ -39,7 +39,7 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c {% if wallet.walletdate %}{{wallet.walletdate}}{% else %} {% endif %} {% if wallet.name %}{{wallet.name|truncatechars:20}}{% else %}{% if wallet.displaynames %} {% for dn in wallet.displaynames %}{{dn}}{%if not forloop.last %}, {% endif %} {% endfor %}{% else %} {% endif %}{% endif %} - {% if wallet.slugpeople %}{%for p in wallet.slugpeople%}{{p.fullname}}{%if not forloop.last %}, {% endif %}{% endfor %}{% else %}{{wallet.persons }}{% endif %} + {% if wallet.slugpeople %}{%for p in wallet.slugpeople%}{{p.fullname}}{%if not forloop.last %}, {% endif %}{% endfor %}{% else %}{{wallet.persons }}{% endif %} {% if wallet.cave %} {% if wallet.caveobj.slug %}