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

extract more into ARGE pending cave pages

This commit is contained in:
Philip Sargent 2023-10-25 22:35:51 +03:00
parent 0843a27966
commit f14bd984f8

View File

@ -216,11 +216,17 @@ def do_ARGE_cave(slug, caveid, areacode, svxid):
line1 = s.readline() line1 = s.readline()
line2 = s.readline() line2 = s.readline()
line3 = s.readline() line3 = s.readline()
rest = s.readlines()
else: else:
print(f"not correct svxid {svxid} {sv}", file=sys.stderr) print(f"not correct svxid {svxid} {sv}", file=sys.stderr)
print(f"{caveid} {rest}")
passages = "\n"
for line in rest:
if line.strip().startswith("*begin"):
passages = f"{passages}{line}"
cave = Cave( cave = Cave(
underground_description="ARGE cave.<br>3 lines of the survexfile:<br><pre>" + line1 +line2 +line3 +"</pre>", underground_description="ARGE cave.<br>3 lines of the survexfile, then all the *begin lines:<br><pre>" + line1 +line2 +line3 +passages +"</pre>",
unofficial_number="ARGE", unofficial_number="ARGE",
survex_file= f"{svxid}.svx", survex_file= f"{svxid}.svx",
url=url, url=url,