forked from expo/troggle
Not quite getting all the blog post contents
This commit is contained in:
@@ -52,10 +52,10 @@ 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"),
|
||||
# "2022": ("ukcavingblog.html", "parser_blog"),
|
||||
"2019": ("ukcavingblog.html", "parser_blog"),
|
||||
"2022": ("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"
|
||||
DEFAULT_LOGBOOK_PARSER = "parser_html"
|
||||
@@ -86,7 +86,7 @@ LOGBOOK_PARSER_SETTINGS = {
|
||||
"1982": ("log.htm", "parser_html_01"),
|
||||
}
|
||||
|
||||
entries = { "2022": 64, "2019": 56, "2018": 75, "2017": 76, "2016": 81, "2015": 79,
|
||||
entries = { "2022": 86, "2019": 56, "2018": 86, "2017": 76, "2016": 83, "2015": 79,
|
||||
"2014": 65, "2013": 51, "2012": 75, "2011": 68, "2010": 22, "2009": 53,
|
||||
"2008": 49, "2007": 113, "2006": 60, "2005": 55, "2004": 76, "2003": 42, "2002": 31,
|
||||
"2001": 48, "2000": 54, "1999": 79, "1998": 43, "1997": 53, "1996": 95, "1995": 42,
|
||||
@@ -510,7 +510,7 @@ def parser_blog(year, expedition, txt, sq=""):
|
||||
tu = 0
|
||||
logbook_entry_count = 0
|
||||
for i in range(0, len(tripparas)):
|
||||
trippara = tripparas[i]
|
||||
tripcontent = tripparas[i]
|
||||
triphead = tripheads[i]
|
||||
logbook_entry_count += 1
|
||||
tid = set_trip_id(year,logbook_entry_count) +"_blog" + sq
|
||||
@@ -550,7 +550,11 @@ 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 = f"\n\nBlog Author: {trippeople}" + trippara
|
||||
tripcontent = re.sub(r"(width=\"\d+\")","",tripcontent)
|
||||
tripcontent = re.sub(r"height=\"\d+\"","",tripcontent)
|
||||
tripcontent = re.sub(r"width: \d+px","",tripcontent)
|
||||
tripcontent = re.sub(r"\n\n+","\n\n",tripcontent)
|
||||
tripcontent = f"\n\nBlog Author: {trippeople}" + tripcontent
|
||||
|
||||
entrytuple = (tripdate, location, tripname, tripcontent,
|
||||
trippeople, expedition, tu, tid)
|
||||
|
||||
Reference in New Issue
Block a user