2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-18 18:17:21 +00:00

more detail in wild survex report

This commit is contained in:
2025-10-20 22:34:28 +03:00
parent 5e4ab5006f
commit 7daef9f253
3 changed files with 22 additions and 8 deletions

View File

@@ -222,6 +222,7 @@ class SurvexBlock(models.Model):
name = models.CharField(max_length=100)
title = models.CharField(max_length=200)
parent = models.ForeignKey("SurvexBlock", blank=True, null=True, on_delete=models.SET_NULL, db_index=True)
ref_text = models.CharField(max_length=200, blank=True, null=True)
date = models.DateField(blank=True, null=True)
expedition = models.ForeignKey("Expedition", blank=True, null=True, on_delete=models.SET_NULL, db_index=True)

View File

@@ -294,7 +294,7 @@ class LoadingSurvex:
rx_include = re.compile(r"(?i)^\s*(\*include[\s].*)$")
rx_include2 = re.compile("(?i)include$")
rx_commref = re.compile(r"(?i)^\s*ref(?:erence)?[\s.:]*(\d+)\s*#\s*(X)?\s*(\d+)")
rx_ref_text = re.compile(r'(?i)^\s*\"[^"]*\"\s*$')
rx_ref_text = re.compile(r'(?i)^\s*\"([^"]*)\"\s*$')
rx_star = re.compile(r"(?i)\s*\*[\s,]*(\w+)\s*(.*?)\s*(?:;.*)?$")
rx_starref = re.compile(r"(?i)^\s*\*ref[\s.:]*((?:19[6789]\d)|(?:20[0123]\d))\s*#?\s*(X)?\s*(.*?\d+.*?)$")
rx_argsref = re.compile(r"(?i)^[\s.:]*((?:19[6789]\d)|(?:20[012345]\d))\s*#?\s*(X)?\s*(.*?\d+.*?)$")
@@ -1172,7 +1172,12 @@ class LoadingSurvex:
if refline:
# a textual reference such as "1996-1999 Not-KH survey book pp 92-95"
# this produces a lot of printout, so don't print it
# print(f"{self.insp} *REF quoted text so ignored:{args} in {survexblock.survexfile.path}")
reftxt = refline.groups()[0] # only one item in this tuple
if reftxt:
print(f"{self.insp} *REF quoted text: '{reftxt}' in {survexblock.survexfile.path}")
# only store it if not an empty string
survexblock.ref_text = reftxt
survexblock.save()
return
if len(args) < 4:

View File

@@ -16,7 +16,9 @@
i.e. they have a survex block (begin..end) with no *REF line which refers to the wallet holding the raw data for that block of data.
<p>These have "; Messteam", "; Zeichner" or "; "LUSS Dead Mountains" in the survex block, so are non expo surveys.
<table>
<tr><th>survex block with no *ref</th><th>date</th><th>parent block</th><th>within survex file</th><th>surveyed length</th></tr>
<tr><th>survex block with no *ref</th><th>date</th><th>parent block</th><th>within survex file</th><th>surveyed length</th>
<th>Foreign?</th><th>*ref text</th>
</tr>
{% for sb in svxforeign %}
<tr>
<td style="text-align:center"> {{ sb }} </td>
@@ -24,13 +26,16 @@ i.e. they have a survex block (begin..end) with no *REF line which refers to the
<td style="text-align:center"> {{sb.parent }} </td>
<td style="text-align:left"> <a href="{% url "svx" sb.survexfile.path %}">{{sb.survexfile.path}}</a> </td>
<td style="text-align:center"> {{sb.legslength|floatformat:"1g" }}m </td>
<td style="text-align:center"> {% if sb.foreigners %} &#10004; {% endif %}</td>
<td style="text-align:left"> {% if sb.ref_text %}{{sb.ref_text|truncatechars:50 }}{% endif %} </td>
{% endfor %}
</table>
<p>These do not have "; Messteam", "; Zeichner" or "; "LUSS Dead Mountains" in the survex block, so are <em>probably</em> expo surveys; definitely if they have identified team members (or have zero length).
<p>These do not have "; Messteam", "; Zeichner" or "; "LUSS Dead Mountains" in the survex block, so are <em>probably</em> expo surveys; definitely if they have identified expo team members (or have zero length).
<p>If there is a tick on the "Foreign?" field it means that one of the team members has been recognised as a known "foreigner",
probably from a "; Messteam:" line.
<table>
<tr><th>survex block with no *ref</th><th>date</th><th>parent block</th><th>within survex file</th><th>surveyed length</th><th>team</th></tr>
<tr><th>survex block with no *ref</th><th>date</th><th>parent block</th><th>within survex file</th><th>surveyed length</th><th>team</th><th>Foreign?</th><th>*ref text</th></tr>
{% for sb in svxwild %}
<tr>
<td style="text-align:center"> {{ sb }} </td>
@@ -38,7 +43,10 @@ i.e. they have a survex block (begin..end) with no *REF line which refers to the
<td style="text-align:center"> {{sb.parent }} </td>
<td style="text-align:left"> <a href="{% url "svx" sb.survexfile.path %}">{{sb.survexfile.path}}</a> </td>
<td style="text-align:center"> {{sb.legslength|floatformat:"1g" }}m </td>
<td style="text-align:center"> {{sb.team|truncatechars:50 }} </td></tr>
<td style="text-align:center"> {{sb.team|truncatechars:50 }} </td>
<td style="text-align:center"> {% if sb.foreigners %} &#10004; {% endif %}</td>
<td style="text-align:left"> {% if sb.ref_text %}{{sb.ref_text|truncatechars:50 }}{% endif %} </td>
</tr>
{% endfor %}
</table>
<br />