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

fixing entrance import messages

This commit is contained in:
Philip Sargent 2024-06-29 12:08:33 +03:00
parent 897cdf9aee
commit 24a97b9dbd

View File

@ -713,7 +713,7 @@ def read_cave(filename, mvf=None, cave=None):
mvtext = f"mv {filename} {correctslug}.html"
#print(mvtext)
if filename != f"{correctslug}.html" :
message = f" ! Filename is not the same as the cave slug '{slug}' != '{areacode}-{unofficial_number}' {url=} in file {filename} so use troggle/mvscript.sh to fix."
message = f" ! Filename is not the same as the cave slug '{slug}' != '{areacode}-{unofficial_number}' {url=} in file {filename} so use /tmp/mvscript.sh to fix."
DataIssue.objects.create(parser="caves", message=message, url=msgurl) # url here is for where the file actually is, for editing
mvf.write(mvtext + "\n")
print(message)
@ -932,7 +932,7 @@ def readcaves():
with transaction.atomic():
print(" - Reading Caves from cave descriptions xml files")
mvscript = "mvscript.sh" # in .gitignore so no problem creating it on server in /troggle/
mvscript = "/tmp/mvscript.sh" # in .gitignore so no problem creating it on server in /troggle/
with open(mvscript, "w") as mvf: # overwrite
mvf.write(f"cd {CAVEDESCRIPTIONS}\n")
for filename in next(os.walk(CAVEDESCRIPTIONS))[2]: # Should be a better way of getting a list of files