diff --git a/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py b/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py
index 7a81e8bab..18350f503 100644
--- a/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py
+++ b/noinfo/prospecting_guide_scripts/make-prospectingguide-new.py
@@ -56,7 +56,7 @@ def exists_in_path(cmd):
extensions = os.environ.get("PATHEXT", "").split(os.pathsep)
for directory in os.environ.get("PATH", "").split(os.pathsep):
- base = os.path.join(directory, cmd)
+ base = os.path.join(directory, cmd)
options = [base] + [(base + ext) for ext in extensions]
for filename in options:
if os.path.exists(filename):
@@ -65,7 +65,7 @@ def exists_in_path(cmd):
def chomp(s):
if not s: return s
- if(s[-1]=="\n"): return s[:-1]
+ if s[-1]=="\n": return s[:-1]
else: return s
def find_effective_number(c):
@@ -77,25 +77,25 @@ def find_effective_number(c):
def longnumber(c, number):
"""Both numbers"""
- if (c["Unofficial number"] and c["Unofficial number"] != number):
+ if c["Unofficial number"] and c["Unofficial number"] != number:
return number + " (" + c["Unofficial number"] + ")"
else:
return number
def find_location(cave):
for fixtype in ["tag point in dataset", "other point in dataset", "exact entrance in dataset (drip line/highest enclosed contour)", "GPS post SA", "GPS pre SA"]:
- if(cave[fixtype]):
+ if cave[fixtype]:
return positions[cave[fixtype]]
return 0
-
+
def is_explored(cave):
s = cave["Kat Status Code"]
- if(not s): return "
| "
+ if not s: return " | "
s = s.replace("(?)","")
if s[-1] == " ": s=s[:-1]
- if (not s):
- print "Rogue space in " + find_effective_number(cave)
+ if not s:
+ print "Rogue space in " + find_effective_number(cave)
return " | "
code = s[-1]
if code == '+': status = "good"
@@ -124,16 +124,16 @@ def findability_color(cave):
def is_underground_surveyed(cave):
s = chomp(cave["Underground drawn survey"])
- if(cave["Multiple entrances"] not in ["", "yes"]): return " | "
+ if cave["Multiple entrances"] not in ["", "yes"]: return " | "
if not s:
return "None | "
- if s and (s.find(" -1 or s.find(" -1):
+ if s.find(" -1 or s.find(" -1:
return "Yes | "
else:
return "Missing | "
def have_survey_data(cave):
- if(cave["Multiple entrances"] not in ["", "yes"]): return " | "
+ if cave["Multiple entrances"] not in ["", "yes"]: return " | "
s = chomp(cave["Underground centre line"])
if s: return "Yes | "
s = chomp(cave["Survex file to get length and depth"])
@@ -149,11 +149,11 @@ def have_survey_data(cave):
def has_photo(cave):
s = chomp(cave["Photo of location"])
- if ((cave["Multiple entrances"] not in ["", "yes"]) and chomp(cave["Autogen file"]) == ""):
+ if (cave["Multiple entrances"] not in ["", "yes"]) and chomp(cave["Autogen file"]) == "":
return " | "
if not s:
return "None | "
- if s and (s.find(" -1 or s.find(" -1):
+ if s.find(" -1 or s.find(" -1:
return "Yes | "
else:
return "Missing | "
@@ -165,7 +165,7 @@ def find_label(cave, number):
else: t += cave["Unofficial Name"]
try:
n = number
- if(n[-1] in string.lowercase): n = n[:-1]
+ if n[-1] in string.lowercase: n = n[:-1]
except:
n = "NONE"
if lengths.has_key(n):
@@ -186,24 +186,18 @@ def get_img_name(maparea):
# big map first (zoom factor ignored)
maps = {
-# id left top right bottom zoom
+# id left top right bottom zoom description
# G&K G&K G&K G&K factor
-"all": [34950.9, 86300.0, 38325.0, 80895.6, 1.0,
- "All"],
-"40": [36275.6, 82392.5, 36780.3, 81800.0, 3.0,
- "Eishöhle"],
-"76": [35440.0, 83220.0, 36090.0, 82670.0, 3.0,
- "Eislufthöhle"],
-"204": [36354.1, 84154.5, 37047.4, 83399.7, 3.0,
- "Steinbrückenhöhle"],
-"tc": [35230.0, 82690.0, 36110.0, 82100.0, 3.0,
- "Near Top Camp"],
-"grieß":
- [36000.0, 86300.0, 38320.0, 84400.0, 4.0,
- "Grießkogel Area"],
+# DO NOT just change the coordinates of "all" - they MUST match the borders of the scanned map.
+"all": [34394.9, 84508.6, 37399.4, 80895.6, 1.0, "All"],
+"40": [36275.6, 82392.5, 36780.3, 81800.0, 3.0, "Eishöhle"],
+"76": [35440.0, 83220.0, 36090.0, 82670.0, 3.0, "Eislufthöhle"],
+"204": [36354.1, 84154.5, 37047.4, 83399.7, 3.0, "Steinbrückenhöhle"],
+"tc": [35230.0, 82690.0, 36110.0, 82100.0, 3.0, "Near Top Camp"],
+"gk": [36000.0, 86300.0, 38320.0, 84400.0, 4.0, "Grießkogel Area"],
}
# Keys in the order in which we want the maps output
-mapcodes = ["all", "grieß","40", "76", "204", "tc"]
+mapcodes = ["all", "gk", "40", "76", "204", "tc"]
# Field codes
L = 0
T = 1
@@ -267,7 +261,7 @@ def mungecoord(x, y, mapcode):
# image is 1417 by 2201
# FACTOR1 = 1000.0 / (36670.0-34542.0)
# FACTOR2 = (1201.0-562.0) / (83317 - 81967)
- # FACTOR = (FACTOR1 + FACTOR2)/2
+ # FACTOR = (FACTOR1 + FACTOR2)/2
# The factors aren't the same as the scanned map's at a slight angle. I
# can't be bothered to fix this. Since we zero on the Hinter it makes
# very little difference for caves in the areas round 76 or 204.
@@ -297,7 +291,7 @@ def plot(loctuple, number, area, label):
def writeout_imagemap(data, mapname):
# Munge the list of coordinates into a proper image map.
- # There is a wrinkle here: the HTML spec gives priority
+ # There is a wrinkle here: the HTML spec gives priority
# to the _first_ defined elt, so we swap the order!
n = len(data)
htmlfile.write("