2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-29 05:11:52 +00:00

format tidy & normalise paths in survex *inlcude

This commit is contained in:
Philip Sargent 2020-05-30 02:35:05 +01:00
parent 4205821bac
commit d857cc9084
2 changed files with 6 additions and 6 deletions

View File

@ -294,7 +294,7 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
cmd, line = mstar.groups() cmd, line = mstar.groups()
cmd = cmd.lower() cmd = cmd.lower()
if re.match("include$(?i)", cmd): if re.match("include$(?i)", cmd):
includepath = os.path.join(os.path.split(survexfile.path)[0], re.sub(r"\.svx$", "", line)) includepath = os.path.normpath(os.path.join(os.path.split(survexfile.path)[0], re.sub(r"\.svx$", "", line)))
print((insp+' - Include path found including - ' + includepath)) print((insp+' - Include path found including - ' + includepath))
# Try to find the cave in the DB if not use the string as before # Try to find the cave in the DB if not use the string as before
path_match = re.search(r"caves-(\d\d\d\d)/(\d+|\d\d\d\d-?\w+-\d+)/", includepath) path_match = re.search(r"caves-(\d\d\d\d)/(\d+|\d\d\d\d-?\w+-\d+)/", includepath)

View File

@ -8,16 +8,16 @@
<h1>Expo Experimental</h1> <h1>Expo Experimental</h1>
<p>Number of survey legs: {{nsurvexlegs}}, total length: {{totalsurvexlength}}</p> <p>Number of survey legs: {{nsurvexlegs}}, total length: {{totalsurvexlength|stringformat:".3f"}} km</p>
<table> <table>
<tr><th>Year</th><th>Surveys</th><th>Survey Legs</th><th>Total length</th></tr> <tr><th>Year</th><th>Surveys</th><th>Survey Legs</th><th>Total length<br>(km)</th></tr>
{% for legs in legsbyexpo %} {% for legs in legsbyexpo %}
<tr> <tr>
<td>{{legs.0.year}}</td> <td>{{legs.0.year}}</td>
<td>{{legs.0.survexblock_set.all|length}}</td> <td style="text-align:right">{{legs.0.survexblock_set.all|length}}</td>
<td>{{legs.1.nsurvexlegs}}</td> <td style="text-align:right">{{legs.1.nsurvexlegs|rjust:"10"}}</td>
<td>{{legs.1.survexleglength}}</td> <td style="text-align:right">{{legs.1.survexleglength|stringformat:".3f"}}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>