mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-17 04:57:03 +00:00
bugfix
This commit is contained in:
@@ -317,9 +317,10 @@ def Parseloghtmltxt(year, expedition, txt):
|
|||||||
\s*(?:<div\s+class="timeug">\s*(.*?)</div>)?
|
\s*(?:<div\s+class="timeug">\s*(.*?)</div>)?
|
||||||
\s*$
|
\s*$
|
||||||
''', trippara)
|
''', trippara)
|
||||||
tripid, tripid1, tripdate, trippeople, triptitle, triptext, tu = s.groups()
|
if s:
|
||||||
if not s: # allow title and people to be swapped in order
|
tripid, tripid1, tripdate, trippeople, triptitle, triptext, tu = s.groups()
|
||||||
s = re.match(r'''(?x)(?:\s*<div\sclass="tripdate"\sid=".*?">.*?</div>\s*<p>)? # second date
|
else: # allow title and people to be swapped in order
|
||||||
|
s2 = re.match(r'''(?x)(?:\s*<div\sclass="tripdate"\sid=".*?">.*?</div>\s*<p>)? # second date
|
||||||
\s*(?:<a\s+id="(.*?)"\s*/>\s*</a>)?
|
\s*(?:<a\s+id="(.*?)"\s*/>\s*</a>)?
|
||||||
\s*<div\s+class="tripdate"\s*(?:id="(.*?)")?>(.*?)</div>(?:<p>)?
|
\s*<div\s+class="tripdate"\s*(?:id="(.*?)")?>(.*?)</div>(?:<p>)?
|
||||||
\s*<div\s+class="triptitle">\s*(.*?)</div>
|
\s*<div\s+class="triptitle">\s*(.*?)</div>
|
||||||
@@ -328,15 +329,15 @@ def Parseloghtmltxt(year, expedition, txt):
|
|||||||
\s*(?:<div\s+class="timeug">\s*(.*?)</div>)?
|
\s*(?:<div\s+class="timeug">\s*(.*?)</div>)?
|
||||||
\s*$
|
\s*$
|
||||||
''', trippara)
|
''', trippara)
|
||||||
tripid, tripid1, tripdate, triptitle, trippeople, triptext, tu = s.groups()
|
if s2:
|
||||||
|
tripid, tripid1, tripdate, triptitle, trippeople, triptext, tu = s2.groups()
|
||||||
if not s:
|
else:
|
||||||
if not re.search(r"Rigging Guide", trippara):
|
if not re.search(r"Rigging Guide", trippara):
|
||||||
msg = " !- Logbook. Can't parse: {} entry:{}".format(trippara, logbook_entry_count)
|
msg = " !- Logbook. Can't parse: {} entry:{}".format(trippara, logbook_entry_count)
|
||||||
print(msg)
|
print(msg)
|
||||||
DataIssue.objects.create(parser='logbooks', message=msg)
|
DataIssue.objects.create(parser='logbooks', message=msg)
|
||||||
logdataissues[tid]=msg
|
logdataissues[tid]=msg
|
||||||
continue
|
continue
|
||||||
|
|
||||||
ldate = ParseDate(tripdate.strip(), year)
|
ldate = ParseDate(tripdate.strip(), year)
|
||||||
triptitles = triptitle.split(" - ")
|
triptitles = triptitle.split(" - ")
|
||||||
|
|||||||
Reference in New Issue
Block a user