summaryrefslogtreecommitdiffstats
path: root/parsers/logbooks.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2022-12-17 17:05:55 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2022-12-17 17:05:55 +0000
commit73b710d53f0ea4fb4c1693679732e19a53530d1d (patch)
treec0ed360ae029af40a2b8d63394847dce83a8d909 /parsers/logbooks.py
parent0a4471e039ce756d207d24733e0095352d32febb (diff)
downloadtroggle-73b710d53f0ea4fb4c1693679732e19a53530d1d.tar.gz
troggle-73b710d53f0ea4fb4c1693679732e19a53530d1d.tar.bz2
troggle-73b710d53f0ea4fb4c1693679732e19a53530d1d.zip
fix more logbook parsing
Diffstat (limited to 'parsers/logbooks.py')
-rw-r--r--parsers/logbooks.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py
index ef2ce1d..cde11bd 100644
--- a/parsers/logbooks.py
+++ b/parsers/logbooks.py
@@ -53,6 +53,7 @@ data for old logbooks. New design needed, with a mechanism for flagging fixtures
MAX_LOGBOOK_ENTRY_TITLE_LENGTH = 200
BLOG_PARSER_SETTINGS = {
# "2017": ("ukcavingblog.html", "parser_blog"), # now folded in to logbooks.html
+ "2018": ("ukcavingblog.html", "parser_blog"),
"2019": ("ukcavingblog.html", "parser_blog"),
"2022": ("ukcavingblog.html", "parser_blog"),
}
@@ -67,7 +68,7 @@ LOGBOOK_PARSER_SETTINGS = {
"2008": ("2008logbook.txt", "wiki_parser"),
"2007": ("logbook.html", "parser_html"),
"2006": ("logbook.html", "parser_html"),
-# "2006": ("logbook/logbook_06.txt", "wiki_parser"),
+# "2006": ("logbook/logbook_06.txt", "wiki_parser"), # converted to html
"2006": ("logbook.html", "parser_html"),
"2005": ("logbook.html", "parser_html"),
"2004": ("logbook.html", "parser_html"),
@@ -140,10 +141,12 @@ def GetTripPersons(trippeople, expedition, logtime_underground, tid=None):
tripperson = "Mike Richardson"
if tripperson =="MikeTA":
tripperson = "Mike Richardson"
- if tripperson =="cavingpig":
+ if tripperson =="CavingPig":
tripperson = "Elaine Oliver"
if tripperson =="nobrotson":
tripperson = "Rob Watson"
+ if tripperson =="Tinywoman":
+ tripperson = "Nadia"
personyear = GetPersonExpeditionNameLookup(expedition).get(tripperson.lower())
@@ -528,7 +531,7 @@ def parser_blog(year, expedition, txt, sq=""):
if (len(tripheads) !=len(tripparas)):
print(f"{len(tripheads)} != {len(tripparas)}")
- location = "Plateau"
+ location = "Plateau" # best guess, fix manually later
tu = 0
logbook_entry_count = 0
for i in range(0, len(tripparas)):
@@ -572,7 +575,7 @@ def parser_blog(year, expedition, txt, sq=""):
# tripname must have the location then a hyphen at the beginning as it is ignored by export function
location = "Unknown"
tripname = f"Expo - UK Caving Blog{sq} post {logbook_entry_count}" # must be unique for a given date
- tripcontent = trippara + f"\n\nBlog Author: {trippeople}"
+ tripcontent = f"\n\nBlog Author: {trippeople}" + trippara
entrytuple = (tripdate, location, tripname, tripcontent,
trippeople, expedition, tu, tid)