diff options
Diffstat (limited to 'parsers')
-rw-r--r-- | parsers/drawings.py | 3 | ||||
-rw-r--r-- | parsers/logbooks.py | 6 | ||||
-rw-r--r-- | parsers/scans.py | 3 | ||||
-rw-r--r-- | parsers/survex.py | 8 |
4 files changed, 11 insertions, 9 deletions
diff --git a/parsers/drawings.py b/parsers/drawings.py index 963046d..0273210 100644 --- a/parsers/drawings.py +++ b/parsers/drawings.py @@ -4,8 +4,9 @@ import stat from pathlib import Path import settings -from troggle.core.models.survex import DrawingFile, Wallet +from troggle.core.models.survex import DrawingFile from troggle.core.models.troggle import DataIssue +from troggle.core.models.wallets import Wallet """Searches through all the :drawings: repository looking for tunnel and therion files diff --git a/parsers/logbooks.py b/parsers/logbooks.py index 1d23215..22cdf84 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -66,7 +66,7 @@ ENTRIES = { "2017": 74, "2016": 86, "2015": 80, - "2014": 66, + "2014": 67, "2013": 52, "2012": 76, "2011": 71, @@ -366,14 +366,14 @@ def parser_html(year, expedition, txt, seq=""): if check in dupl: dupl[check] += 1 triptitle = f"{triptitle} #{dupl[check]}" - print(f" - {triptitle} -- {date}") + print(f" - {triptitle} -- {ldate}") else: dupl[check] = 1 tu = tidy_time_underground(tu) trippersons, author = tidy_trip_persons(trippeople, expedition, tu, tid) tripcave = tidy_trip_cave(place) - tripcontent = tidy_trip_image_urls(tripcontent, date) + tripcontent = tidy_trip_image_urls(tripcontent, ldate) tid = tidy_tid(tid, triptitle) entrytuple = (ldate, place, tripcave, triptitle, tripcontent, trippersons, author, expedition, tu, tid) diff --git a/parsers/scans.py b/parsers/scans.py index d3fb9ab..00538fe 100644 --- a/parsers/scans.py +++ b/parsers/scans.py @@ -2,8 +2,9 @@ import datetime from pathlib import Path import settings -from troggle.core.models.survex import SingleScan, Wallet +from troggle.core.models.survex import SingleScan from troggle.core.models.troggle import DataIssue +from troggle.core.models.wallets import Wallet """Searches through all the survey scans directories (wallets) in expofiles, looking for images to be referenced. """ diff --git a/parsers/survex.py b/parsers/survex.py index b741e30..bbe61a7 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -121,7 +121,7 @@ def get_offending_filename(path): """ return "/survexfile/" + path + ".svx" -trip_people_cache = {} # DANGEROUS, should clean it on PUSH/POP begin/end +trip_people_cache = {} # per survexblock, so robust wrt PUSH/POP begin/end def get_team_on_trip(survexblock): """Uses a cache to avoid a database query if it doesn't need to. Only used for complete team.""" @@ -145,7 +145,7 @@ def get_people_on_trip(survexblock): return list(set(people)) -trip_person_cache = {} # pre survexblock, so robust wrt PUSH/POP begin/end +trip_person_cache = {} # per survexblock, so robust wrt PUSH/POP begin/end def put_person_on_trip(survexblock, personexpedition, tm): """Uses a cache to avoid a database query if it doesn't need to. Only used for a single person""" @@ -170,7 +170,7 @@ def put_person_on_trip(survexblock, personexpedition, tm): trip_person_cache[(survexblock, personexpedition)] = 1 return False -person_pending_cache = {} # pre survexblock, so robust wrt PUSH/POP begin/end +person_pending_cache = {} # per survexblock, so robust wrt PUSH/POP begin/end def add_to_pending(survexblock, tm): """Collects team names before we have a date so cannot validate against expo attendance yet""" @@ -354,7 +354,7 @@ class LoadingSurvex: knowing the year. Unless its parent has an identified expo""" if survexblock.parent.name == "troggle_unseens": - # Bolluxed up if we try to inherit from this random junk + # Bolluxed up if we try to inherit from this random junk, so don't. return expo = survexblock.expedition # may be None if no *date yet |