mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 21:17:11 +00:00
Updating comments
This commit is contained in:
@@ -88,7 +88,7 @@ def do_pending_cave(k, url, area):
|
||||
'''
|
||||
def get_survex_file(k):
|
||||
'''Guesses at and finds a survex file for this pending cave.
|
||||
Convoluted. Sorry. Needs rewriting
|
||||
Convoluted. Needs rewriting
|
||||
'''
|
||||
if k[0:3] == "162":
|
||||
id = Path(k[5:])
|
||||
@@ -199,6 +199,9 @@ def do_pending_cave(k, url, area):
|
||||
|
||||
|
||||
def readentrance(filename):
|
||||
'''Reads an enrance description from the .html file
|
||||
Convoluted. Sorry.This is as I inherited it and I haven't fiddled with it. Needs rewriting
|
||||
'''
|
||||
global entrances_xslug
|
||||
global caves_xslug
|
||||
global areas_xslug
|
||||
@@ -296,7 +299,9 @@ def readentrance(filename):
|
||||
# print(message)
|
||||
|
||||
def readcave(filename):
|
||||
'''Assumes any area it hasn't seen before is a subarea of 1623
|
||||
'''Reads an enrance description from the .html file
|
||||
Convoluted. Sorry.This is as I inherited it and I haven't fiddled with it. Needs rewriting
|
||||
Assumes any area it hasn't seen before is a subarea of 1623
|
||||
'''
|
||||
global entrances_xslug
|
||||
global caves_xslug
|
||||
@@ -447,6 +452,8 @@ def readcave(filename):
|
||||
print(message)
|
||||
|
||||
def getXML(text, itemname, minItems = 1, maxItems = None, printwarnings = True, context = ""):
|
||||
"""Reads a single XML tag
|
||||
"""
|
||||
items = re.findall("<%(itemname)s>(.*?)</%(itemname)s>" % {"itemname": itemname}, text, re.S)
|
||||
if len(items) < minItems and printwarnings:
|
||||
message = " ! %(count)i x %(itemname)s found, at least %(min)i expected. Load ABORT. " % {"count": len(items),
|
||||
|
||||
Reference in New Issue
Block a user