From dc3a61addd2440fc024d50adf6ba3369858ced3e Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 20 Dec 2022 16:38:32 +0000 Subject: [PATCH] convert old logbooks to modern format --- parsers/imports.py | 2 +- parsers/logbooks.py | 10 +++++----- templates/cavewallets.html | 2 +- templates/logbookentry.html | 2 +- templates/yearwallets.html | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/parsers/imports.py b/parsers/imports.py index e44a2f0..e445a2a 100644 --- a/parsers/imports.py +++ b/parsers/imports.py @@ -41,7 +41,7 @@ def import_logbooks(): with transaction.atomic(): troggle.parsers.logbooks.LoadLogbooks() -def import_logbook(year=2019): +def import_logbook(year=1982): print(f"-- Importing Logbook {year}") with transaction.atomic(): troggle.parsers.logbooks.LoadLogbook(year) diff --git a/parsers/logbooks.py b/parsers/logbooks.py index aaa764a..e3d9d06 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -77,10 +77,10 @@ LOGBOOK_PARSER_SETTINGS = { "1989": ("log.htm", "parser_html_01"), #crashes MySQL "1988": ("log.htm", "parser_html_01"), #crashes MySQL "1987": ("log.htm", "parser_html_01"), #crashes MySQL - "1985": ("log.htm", "parser_html_01"), - "1984": ("log.htm", "parser_html_01"), - "1983": ("log.htm", "parser_html_01"), - "1982": ("log.htm", "parser_html_01"), + "1985": ("logbook.html", "parser_html"), + "1984": ("logbook.html", "parser_html"), + "1983": ("logbook.html", "parser_html"), + "1982": ("logbook.html", "parser_html"), } entries = { "2022": 86, "2019": 56, "2018": 100, "2017": 76, "2016": 83, "2015": 79, @@ -89,7 +89,7 @@ entries = { "2022": 86, "2019": 56, "2018": 100, "2017": 76, "2016": 83, "2015": "2001": 48, "2000": 54, "1999": 79, "1998": 43, "1997": 53, "1996": 95, "1995": 42, "1994": 32, "1993": 41, "1992": 62, "1991": 39, "1990": 87, "1989": 1,"1988": 1,"1987": 1, "1985": 24, "1984": 32, "1983": 52, "1982": 42,} -# Logbooks log.htm exist for 1983, 84, 85, 87, 88, 89 but have no full-working parser, or need hand-editing. +# Logbooks log.htm exist for 87, 88, 89 but have no full-working parser, or need hand-editing. logentries = [] # the entire logbook for one year is a single object: a list of entries noncaveplaces = [ "Journey", "Loser Plateau", "UNKNOWN", 'plateau', diff --git a/templates/cavewallets.html b/templates/cavewallets.html index 074ad13..6909bb2 100644 --- a/templates/cavewallets.html +++ b/templates/cavewallets.html @@ -15,7 +15,7 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c

This lists all the files in a wallet, some of which may not be for this specific cave.

See also wallets