{% extends "base.html" %}
{% block title %}Aliases for people's names - for debugging {% endblock %}

{% block content %}

<h1>Aliases for people's names in {{year}}</h1>

<p>This is the list of people on expo this year.
<table>
<tr><th>Person</th><th>slug</th><th>aliases</th></tr>
{% for pe in personexpeditions %}
<tr>
   <td>{{pe.person}}</td>
   <td>{{pe.slugfield}}</td>
   <td>{{pe.slugfield}}</td>
 </tr>
{% endfor %}
</table>

<p>This table below  lists the possible unambiguous ways of identifying a person in a survex file or a logbook entry. 
This ridiculously long list of alternatives is derived from what people have actually done in the last 40 years.
<p>Note that this is year specific: On a year with only one 'Sophie' then the identifier 'Sophie' will be fine. 
On a year with more than one Sophie, an additional disambiguation is required, such as a surnbame or the first letter of the surname.
In the case of a year with two people called Ben, both of whose surnames begin with W (yes this has happened),
the entire surname is required.
<table>
<tr><th>alias</th><th>who</th></tr>
{% for key, value  in aliasdict.items %}
 <tr>
   <td>'{{key}}'</td>
   <td>{{value}}</td>
 </tr>
{% endfor %}
</table>

<table>
<tr><th>who</th><th>aliases</th></tr>
{% for key, value  in invert.items %}
 <tr>
   <td>{{key}}</td>
   <td>{{value}}</td>
 </tr>
{% endfor %}
</table>

<p>The aliases below are specified in the folk.csv file. Only one alias is possible in that format. The specified alias ('nickname') 
is used in the table above to construct possible unambiguous identifiers.
<table>
<tr><th>First</th><th>Last</th><th>Full name</th><th>Nickname</th><th>expo first</th><th>expo last</th></tr>
{% for p in persons %}
<tr>
   <td><b>{{p.first_name}}</b></td>
   <td><b>{{p.last_name}}</b></td>
   
   <td>{{p.fullname}}</td>
   <td>{{p.nickname}}</td>
   <td>{{p.first.expedition}}</td>
   <td>{{p.last.expedition}}</td>
</tr>
{% 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>.

{% endblock %}