mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
*team format updates
This commit is contained in:
parent
37620b4dbc
commit
90dfa516da
@ -56,7 +56,8 @@ class LoadingSurvex():
|
||||
rx_names = re.compile(r'(?i)names')
|
||||
rx_flagsnot= re.compile(r"not\s")
|
||||
rx_linelen = re.compile(r"[\d\-+.]+$")
|
||||
rx_teammem = re.compile(r"(?i)(Insts|Notes|Tape|Dog|Useless|Pics|Helper|Disto|Consultant)\s+(.*)$")
|
||||
instruments = "(waiting_patiently|slacker|Useless|nagging|unknown|Inst|instrument|rig|rigger|rigging|helper|something| compass|comp|clino|Notes|sketch|book|Tape|Dog|Pics|photo|drawing|Helper|GPS|Disto|Distox|Distox2|topodroid|point|Consultant|nail|polish|varnish|bitch|monkey)"
|
||||
rx_teammem = re.compile(r"(?i)"+instruments+"?(?:es|s)?\s+(.*)"+instruments+"?(?:es|s)?$")
|
||||
rx_person = re.compile(r"(?i) and | / |, | & | \+ |^both$|^none$")
|
||||
rx_qm = re.compile(r'(?i)^\s*QM(\d)\s+?([a-dA-DxX])\s+([\w\-]+)\.(\d+)\s+(([\w\-]+)\.(\d+)|\-)\s+(.+)$')
|
||||
# remember there is also QM_PATTERN used in views_other and set in settings.py
|
||||
@ -134,6 +135,16 @@ class LoadingSurvex():
|
||||
models.DataIssue.objects.create(parser='survex', message=message)
|
||||
|
||||
def LoadSurvexTeam(self, survexblock, line):
|
||||
"""Interpeting the *team fields means interpreting older style survex as well as current survex standard,
|
||||
*team Insts Anthony Day - this is how most of our files specify the team member
|
||||
*team "Anthony Day" notes pictures tape - this is how the survex documentation says it should be done
|
||||
We have a huge variety of abbreviations and mispellings. The most laconic being
|
||||
*team gb, bl
|
||||
If you look at e.g. http://expo.survex.com/survexfile/161#T_caves-1623/161/lhr/alllhr
|
||||
you will see than have the team members are recognised by this parser, but not recognised by the
|
||||
wider troggle system (the name is not a hyperlink) - apparently randomly.
|
||||
GetPersonExpeditionNameLookup() needs to be fixed.
|
||||
"""
|
||||
teammembers = [ ]
|
||||
mteammember = self.rx_teammem.match(line)
|
||||
if mteammember:
|
||||
|
Loading…
Reference in New Issue
Block a user