Skip to content

Commit

Permalink
Script and doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyst committed Jan 26, 2021
1 parent 3b17bb4 commit e393083
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
23 changes: 22 additions & 1 deletion docs/static/css/survey.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
@font-face {
font-family: "Computer Modern";
src: url("http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf");
}
@font-face {
font-family: "Computer Modern";
src: url("http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunsx.otf");
font-weight: bold;
}
@font-face {
font-family: "Computer Modern";
src: url("http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunsi.otf");
font-style: italic, oblique;
}
@font-face {
font-family: "Computer Modern";
src: url("http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunbxo.otf");
font-weight: bold;
font-style: italic, oblique;
}

html,
body {
padding: 0;
margin: 0;
font-family: sans-serif;
font-family: "Computer Modern", sans-serif;
}

#svg {
Expand Down
1 change: 1 addition & 0 deletions docs/static/html/caveview.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<html>
<head>
<title>Cave View - Imperial College Caving Club</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="author" content="ICCC" />
<meta name="theme-color" content="#2D2D2D" />
Expand Down
13 changes: 10 additions & 3 deletions scripts/create_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,20 @@
lines = []
with open(join(tmpdir, "xvi.xvi"), "r", encoding="utf-8") as f:
xvi_lines = f.readlines()
# Extract all the stationss
# Extract all the stations
for line in xvi_lines:
match = re.search("{\s*(-?\d+\.\d+)\s*(-?\d+\.\d+)\s*(\S+)\s*}", line)
match = re.search("{\s*(-?\d+\.\d+)\s*(-?\d+\.\d+)\s([^@]+)@([^\s}]*)\s*}", line)
if match:
x = match.groups()[0]
y = match.groups()[1]
station = match.groups()[2]
station_number = match.groups()[2]
namespace = match.groups()[3]
namespace_array = namespace.split(".")
print(namespace)
station = station_number
if len(namespace_array) > 1:
station = "{}@{}".format(station_number, ".".join(namespace_array[0:-1]))

stations["{}.{}".format(x, y)] = [x, y, station]

# Extract all the lines
Expand Down
4 changes: 2 additions & 2 deletions scripts/create_system_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def get_drawn_length(survey):
else:
json_data[system][projection]["percent"] = 100
if not proj_is_drawn["plan"]:
need_plan.append(source.name)
need_plan.append(".".join(source.id))
if not proj_is_drawn["extended"]:
need_extended.append(source.name)
need_extended.append(".".join(source.id))

for system in systems:
print(system)
Expand Down

0 comments on commit e393083

Please sign in to comment.