diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2020-05-30 02:35:05 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2020-05-30 02:35:05 +0100 |
commit | d857cc9084e69a4b4598b5c1af8abf8b707cdbda (patch) | |
tree | 17734810f43426d84a8562a0b926b55c6f302fa2 | |
parent | 4205821bac5fc9a402a9f6143c736f2448233d0c (diff) | |
download | troggle-d857cc9084e69a4b4598b5c1af8abf8b707cdbda.tar.gz troggle-d857cc9084e69a4b4598b5c1af8abf8b707cdbda.tar.bz2 troggle-d857cc9084e69a4b4598b5c1af8abf8b707cdbda.zip |
format tidy & normalise paths in survex *inlcude
-rw-r--r-- | parsers/survex.py | 2 | ||||
-rw-r--r-- | templates/experimental.html | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/parsers/survex.py b/parsers/survex.py index b7158aa..9a03a1b 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -294,7 +294,7 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines): cmd, line = mstar.groups() cmd = cmd.lower() 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)) # 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) diff --git a/templates/experimental.html b/templates/experimental.html index d7dbd88..17d96ef 100644 --- a/templates/experimental.html +++ b/templates/experimental.html @@ -8,16 +8,16 @@ <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> -<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 %} <tr> <td>{{legs.0.year}}</td> - <td>{{legs.0.survexblock_set.all|length}}</td> - <td>{{legs.1.nsurvexlegs}}</td> - <td>{{legs.1.survexleglength}}</td> + <td style="text-align:right">{{legs.0.survexblock_set.all|length}}</td> + <td style="text-align:right">{{legs.1.nsurvexlegs|rjust:"10"}}</td> + <td style="text-align:right">{{legs.1.survexleglength|stringformat:".3f"}}</td> </tr> {% endfor %} </table> |