mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-18 17:47:03 +00:00
more detail in wild survex report
This commit is contained in:
@@ -222,6 +222,7 @@ class SurvexBlock(models.Model):
|
|||||||
name = models.CharField(max_length=100)
|
name = models.CharField(max_length=100)
|
||||||
title = models.CharField(max_length=200)
|
title = models.CharField(max_length=200)
|
||||||
parent = models.ForeignKey("SurvexBlock", blank=True, null=True, on_delete=models.SET_NULL, db_index=True)
|
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)
|
date = models.DateField(blank=True, null=True)
|
||||||
expedition = models.ForeignKey("Expedition", blank=True, null=True, on_delete=models.SET_NULL, db_index=True)
|
expedition = models.ForeignKey("Expedition", blank=True, null=True, on_delete=models.SET_NULL, db_index=True)
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ class LoadingSurvex:
|
|||||||
rx_include = re.compile(r"(?i)^\s*(\*include[\s].*)$")
|
rx_include = re.compile(r"(?i)^\s*(\*include[\s].*)$")
|
||||||
rx_include2 = re.compile("(?i)include$")
|
rx_include2 = re.compile("(?i)include$")
|
||||||
rx_commref = re.compile(r"(?i)^\s*ref(?:erence)?[\s.:]*(\d+)\s*#\s*(X)?\s*(\d+)")
|
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_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_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+.*?)$")
|
rx_argsref = re.compile(r"(?i)^[\s.:]*((?:19[6789]\d)|(?:20[012345]\d))\s*#?\s*(X)?\s*(.*?\d+.*?)$")
|
||||||
@@ -1171,8 +1171,13 @@ class LoadingSurvex:
|
|||||||
refline = self.rx_ref_text.match(args)
|
refline = self.rx_ref_text.match(args)
|
||||||
if refline:
|
if refline:
|
||||||
# a textual reference such as "1996-1999 Not-KH survey book pp 92-95"
|
# 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
|
# 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
|
return
|
||||||
|
|
||||||
if len(args) < 4:
|
if len(args) < 4:
|
||||||
|
|||||||
@@ -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.
|
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.
|
<p>These have "; Messteam", "; Zeichner" or "; "LUSS Dead Mountains" in the survex block, so are non expo surveys.
|
||||||
<table>
|
<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 %}
|
{% for sb in svxforeign %}
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:center"> {{ sb }} </td>
|
<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: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: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.legslength|floatformat:"1g" }}m </td>
|
||||||
|
<td style="text-align:center"> {% if sb.foreigners %} ✔ {% endif %}</td>
|
||||||
|
<td style="text-align:left"> {% if sb.ref_text %}{{sb.ref_text|truncatechars:50 }}{% endif %} </td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</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>
|
<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 %}
|
{% for sb in svxwild %}
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:center"> {{ sb }} </td>
|
<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: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: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.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 %} ✔ {% endif %}</td>
|
||||||
|
<td style="text-align:left"> {% if sb.ref_text %}{{sb.ref_text|truncatechars:50 }}{% endif %} </td>
|
||||||
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
Reference in New Issue
Block a user