2019 blog edits

This commit is contained in:
Philip Sargent 2022-12-20 15:18:07 +00:00
parent 81e95291e8
commit 9169abdb05
2 changed files with 17 additions and 19 deletions

View File

@ -191,21 +191,19 @@ img.icon { vertical-align: middle; }
img.aligntop { vertical-align: top; } img.aligntop { vertical-align: top; }
blockquote { blockquote {
font: Georgia, "Times New Roman", Times, serif; font: Georgia, "Times New Roman", Times, serif;
font-weight:bold; width: 80%;
font-variant:small-caps; /* width: 400px; */
width: 400px; padding-left: 8;
background: url(../close-quote.gif) no-repeat right bottom; /* text-indent: -25px; */
padding-left: 25px; text-align: left;
text-indent: -25px;
text-align: right;
vertical-align:bottom; vertical-align:bottom;
color:#CCCC66; color:#4444dd;
}
blockquote:first-letter {
background: url(../open-quote.gif) no-repeat left top;
padding-left: 40px;
font: italic 1.4em Georgia, "Times New Roman", Times, serif;
} }
/* blockquote:first-letter { */
/* background: url(../open-quote.gif) no-repeat left top; */
/* padding-left: 40px; */
/* font: italic 1.4em Georgia, "Times New Roman", Times, serif; */
/* } */
table.imgtable { margin-left: auto; margin-right: auto; } table.imgtable { margin-left: auto; margin-right: auto; }
table.imgtable td { vertical-align: middle; text-align: center; table.imgtable td { vertical-align: middle; text-align: center;
padding: 10px; } padding: 10px; }

View File

@ -50,7 +50,7 @@ data for old logbooks. New design needed, with a mechanism for flagging fixtures
MAX_LOGBOOK_ENTRY_TITLE_LENGTH = 200 MAX_LOGBOOK_ENTRY_TITLE_LENGTH = 200
BLOG_PARSER_SETTINGS = { BLOG_PARSER_SETTINGS = {
# "2022": ("ukcavingblog.html", "parser_blog"), # "2022": ("ukcavingblog.html", "parser_blog"),
"2019": ("ukcavingblog.html", "parser_blog"), # "2019": ("ukcavingblog.html", "parser_blog"),
# "2018": ("ukcavingblog.html", "parser_blog"), # "2018": ("ukcavingblog.html", "parser_blog"),
# "2017": ("ukcavingblog.html", "parser_blog"), # now folded in to logbooks.html # "2017": ("ukcavingblog.html", "parser_blog"), # now folded in to logbooks.html
} }
@ -582,7 +582,7 @@ def parser_blog(year, expedition, txt, sq=""):
tripcontent = re.sub(r"width: \d+px","",tripcontent) tripcontent = re.sub(r"width: \d+px","",tripcontent)
tripcontent = re.sub(r"\n\n+","\n\n",tripcontent) tripcontent = re.sub(r"\n\n+","\n\n",tripcontent)
tripcontent = re.sub(r"<hr\s*>","",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, entrytuple = (tripdate, location, tripname, tripcontent,
trippeople, expedition, tu, tid) trippeople, expedition, tu, tid)
@ -689,7 +689,7 @@ def LoadLogbookForExpedition(expedition, clean=True):
# print(f"OK {year} {len(logentries):5d} is {expect}\n") # print(f"OK {year} {len(logentries):5d} is {expect}\n")
pass pass
else: 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) return len(logentries)
@ -709,7 +709,7 @@ def LoadLogbook(year):
LOGBOOK_PARSER_SETTINGS[year] = BLOG_PARSER_SETTINGS[year] LOGBOOK_PARSER_SETTINGS[year] = BLOG_PARSER_SETTINGS[year]
nlbe[expo] = LoadLogbookForExpedition(expo, clean=False) # this loads the blog logbook for one expo nlbe[expo] = LoadLogbookForExpedition(expo, clean=False) # this loads the blog logbook for one expo
else: 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(): def LoadLogbooks():
""" This is the master function for parsing all logbooks into the Troggle database. """ This is the master function for parsing all logbooks into the Troggle database.