forked from expo/troggle
Better attempt at creating a default url for caves created by svx files
This commit is contained in:
parent
66ee96cd63
commit
3359889d97
@ -146,10 +146,13 @@ def create_new_cave(svxpath):
|
||||
# double check
|
||||
if a[0:3] == "162":
|
||||
areanum = a[0:4]
|
||||
url = f"{areanum}/{a[5:]}.html" # Note we are appending the .html as we are believe in backwards compatability.
|
||||
url = f"{areanum}/{caveid}.html" # Note we are appending the .html as we are believe in backwards compatability.
|
||||
#url = f"{areanum}/{a[5:]}.html" # This is original code, but a above is only defined as being 4 characters long, so it did not make sense and produced non unique urls
|
||||
else:
|
||||
print(f"WARNING: parsers/caves/create_new_cave called with svxpath '{svxpath}'. Surely it should start 'caves-162*'?")
|
||||
areanum = "1623"
|
||||
url = f"1623/{k}.html"
|
||||
url = f"1623/{caveid}.html"
|
||||
#url = f"1623/{k}.html" # This is original code, but a above is only defined as being 4 characters long, so it did not make sense and produced non unique urls
|
||||
|
||||
k = f"{areanum}-{caveid}"
|
||||
area = get_area(areanum)
|
||||
|
Loading…
Reference in New Issue
Block a user