summaryrefslogtreecommitdiffstats
path: root/parsers/logbooks.py
diff options
context:
space:
mode:
Diffstat (limited to 'parsers/logbooks.py')
-rw-r--r--parsers/logbooks.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py
index 47dd9ba..83a2660 100644
--- a/parsers/logbooks.py
+++ b/parsers/logbooks.py
@@ -56,6 +56,7 @@ DEFAULT_LOGBOOK_PARSER = "parser_html"
LOGBOOK_PARSER_SETTINGS = {
"1982": ("logbook.html", "parser_html"),
}
+LOGBOOKS_DIR = "years" # subfolder of settings.EXPOWEB
ENTRIES = {
"2022": 90,
@@ -97,6 +98,7 @@ ENTRIES = {
"1983": 52,
"1982": 42,
}
+# What about 1970s ! Yes, 80 and 81 are missing, but the older ones need re-parsing !!!
logentries = [] # the entire logbook for one year is a single object: a list of entries
noncaveplaces = ["travel", "Journey", "Loser Plateau", "UNKNOWN", "plateau", "base camp", "basecamp", "top camp", "topcamp"]
@@ -294,7 +296,7 @@ def parser_html(year, expedition, txt, seq=""):
# print(f" - headpara:\n'{headpara}'")
if len(headpara) > 0:
- frontpath = Path(settings.EXPOWEB, "years", year, "frontmatter.html")
+ frontpath = Path(settings.EXPOWEB, LOGBOOKS_DIR, year, "frontmatter.html")
with open(frontpath, "w") as front:
front.write(headpara + "\n")
@@ -304,7 +306,7 @@ def parser_html(year, expedition, txt, seq=""):
# print(f" - endpara:\n'{endpara}'")
if len(endpara) > 0:
- endpath = Path(settings.EXPOWEB, "years", year, "endmatter.html")
+ endpath = Path(settings.EXPOWEB, LOGBOOKS_DIR, year, "endmatter.html")
with open(endpath, "w") as end:
end.write(endpara + "\n")
@@ -511,7 +513,7 @@ def parse_logbook_for_expedition(expedition, blog=False):
logentries = []
logbook_parseable = False
- expologbase = Path(settings.EXPOWEB, "years")
+ expologbase = Path(settings.EXPOWEB, LOGBOOKS_DIR)
year = expedition.year
expect = ENTRIES[year]