summaryrefslogtreecommitdiffstats
path: root/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'parsers')
-rw-r--r--parsers/logbooks.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py
index d194a5e..aaa764a 100644
--- a/parsers/logbooks.py
+++ b/parsers/logbooks.py
@@ -49,9 +49,9 @@ data for old logbooks. New design needed, with a mechanism for flagging fixtures
'''
MAX_LOGBOOK_ENTRY_TITLE_LENGTH = 200
BLOG_PARSER_SETTINGS = {
-# "2022": ("ukcavingblog.html", "parser_blog"),
- "2019": ("ukcavingblog.html", "parser_blog"),
-# "2018": ("ukcavingblog.html", "parser_blog"),
+# "2022": ("ukcavingblog.html", "parser_blog"),
+# "2019": ("ukcavingblog.html", "parser_blog"),
+# "2018": ("ukcavingblog.html", "parser_blog"),
# "2017": ("ukcavingblog.html", "parser_blog"), # now folded in to logbooks.html
}
DEFAULT_LOGBOOK_FILE = "logbook.html"
@@ -582,7 +582,7 @@ def parser_blog(year, expedition, txt, sq=""):
tripcontent = re.sub(r"width: \d+px","",tripcontent)
tripcontent = re.sub(r"\n\n+","\n\n",tripcontent)
tripcontent = re.sub(r"<hr\s*>","",tripcontent)
- tripcontent = f"\n\nBlog Author: {trippeople}" + tripcontent
+ tripcontent = f"\n\n<!-- Content parsed from UK Caving Blog -->\nBlog Author: {trippeople}" + tripcontent
entrytuple = (tripdate, location, tripname, tripcontent,
trippeople, expedition, tu, tid)
@@ -689,7 +689,7 @@ def LoadLogbookForExpedition(expedition, clean=True):
# print(f"OK {year} {len(logentries):5d} is {expect}\n")
pass
else:
- print(f"Mismatch {year} {len(logentries):5d} is not {expect}\n")
+ print(f"Mismatch in number of log entries: {year} {len(logentries):5d} is not {expect}\n")
return len(logentries)
@@ -709,7 +709,7 @@ def LoadLogbook(year):
LOGBOOK_PARSER_SETTINGS[year] = BLOG_PARSER_SETTINGS[year]
nlbe[expo] = LoadLogbookForExpedition(expo, clean=False) # this loads the blog logbook for one expo
else:
- print(f" {year} not in {BLOG_PARSER_SETTINGS}")
+ print(f"Not a year with extant blog entries to import: '{year}' not in BLOG_PARSER_SETTINGS {BLOG_PARSER_SETTINGS}")
def LoadLogbooks():
""" This is the master function for parsing all logbooks into the Troggle database.