diff options
-rw-r--r-- | core/views/cave_kataster.py | 1 | ||||
-rw-r--r-- | templates/cave_kataster.html | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/core/views/cave_kataster.py b/core/views/cave_kataster.py index cbfe3b3..e5a3ea3 100644 --- a/core/views/cave_kataster.py +++ b/core/views/cave_kataster.py @@ -67,6 +67,7 @@ def kataster(request, slug): mvscript += f'sed -i "/<kataster_number>/s/<kataster_number>/<kataster_number>{knum}/" {cavefilename}\n'
mvscript += f'sed -i "/<survex_file>/s/<survex_file>[^<]*/<survex_file>caves-{cave.areacode}\/{knum}\/{knum}.svx/" {cavefilename}\n'
mvscript += f'sed -i "/<entranceslug>/s/<entranceslug>{str(cave)}/<entranceslug>{cave.areacode}-{knum}/" {cavefilename}\n'
+ mvscript += f'sed -i "/href=\|src=/s/\/{cave.areacode}\/{cave.unofficial_number}\//\/{cave.areacode}\/{knum}\//g" {cavefilename}\n'
mvscript += f"mv {cavefilename} {target}.html\n"
diff --git a/templates/cave_kataster.html b/templates/cave_kataster.html index 19a1480..a00a91f 100644 --- a/templates/cave_kataster.html +++ b/templates/cave_kataster.html @@ -66,7 +66,7 @@ This cave needs to be "katastered". If you have the new number issued by the Aus [ TO DO ] <p> <ul style="list-style: disc"> -<li> Edit all the '<samp>href=</samp>' <small>URLS</small> (if they exist) inside all the <samp>cave_data</samp> and <samp>entrance_data</samp> files descriptive text to refer to the new directory +<li> Edit all the '<samp>href=</samp>' and '<samp>src=</samp>' <small>URLS</small> (if they exist) inside all the <samp>cave_data</samp> and <samp>entrance_data</samp> files descriptive text to refer to the new directory <li> Rename the directory (if it exists) inside the areacode directory, e.g. rename <samp>/{{cave.areacode}}/{{cave.unofficial_number}}/</samp> as <samp>/{{cave.areacode}}/<span style="color:blue">{{knum}}</span>/</samp> (if <span style="color:blue">{{knum}}</span> is the correct new kataster number). Do this last. </ul> |