summaryrefslogtreecommitdiffstats
path: root/parsers/caves.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-10-25 22:35:51 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-10-25 22:35:51 +0300
commitf14bd984f88ae4274fbecc690a4a0f0a45210e69 (patch)
tree31524e55c7850ba3d98145ac073c9f4f9ec8aaed /parsers/caves.py
parent0843a279660b9dd76a68164b60140d0a0e14f39a (diff)
downloadtroggle-f14bd984f88ae4274fbecc690a4a0f0a45210e69.tar.gz
troggle-f14bd984f88ae4274fbecc690a4a0f0a45210e69.tar.bz2
troggle-f14bd984f88ae4274fbecc690a4a0f0a45210e69.zip
extract more into ARGE pending cave pages
Diffstat (limited to 'parsers/caves.py')
-rw-r--r--parsers/caves.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/parsers/caves.py b/parsers/caves.py
index b7b6c4c..d2a8306 100644
--- a/parsers/caves.py
+++ b/parsers/caves.py
@@ -216,11 +216,17 @@ def do_ARGE_cave(slug, caveid, areacode, svxid):
line1 = s.readline()
line2 = s.readline()
line3 = s.readline()
+ rest = s.readlines()
else:
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(
- 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",
survex_file= f"{svxid}.svx",
url=url,