summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2025-02-01 17:49:02 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2025-02-01 17:49:02 +0000
commita0243c030e21a6594f6f422fd22e0c3b2026dd40 (patch)
tree8a663fa6c9275619f9dd0739161481ae526996b9
parent859a1dd4a86cd158ac6756624a1ca621ce11d94a (diff)
downloadtroggle-a0243c030e21a6594f6f422fd22e0c3b2026dd40.tar.gz
troggle-a0243c030e21a6594f6f422fd22e0c3b2026dd40.tar.bz2
troggle-a0243c030e21a6594f6f422fd22e0c3b2026dd40.zip
progress on URLS
-rw-r--r--core/views/cave_kataster.py1
-rw-r--r--templates/cave_kataster.html2
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>