mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-17 17:07:06 +00:00
Now matching 2025 survex standard *team
This commit is contained in:
@@ -568,8 +568,8 @@ class LoadingSurvex:
|
||||
return
|
||||
|
||||
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
|
||||
"""Interpeting the *team fields has been updated to current 2025 survex standard,
|
||||
*team Insts Anthony Day - this is how most of our files used to 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
|
||||
@@ -621,30 +621,14 @@ class LoadingSurvex:
|
||||
message = (
|
||||
f"- Team before Date: {line} ({survexblock}) {survexblock.survexfile.path}"
|
||||
)
|
||||
# print(self.insp + message)
|
||||
# stash_data_issue(
|
||||
# parser="survex team", message=message, url=None, sb=(survexblock.survexfile.path)
|
||||
# )
|
||||
|
||||
# teamfix = r"(?i)(.*?)\s+" + roles + r"?(?:es|s)?$" -- (.*?) means a non-greedy capture
|
||||
if fixstyle := self.rx_teamfix.match(line): # matches the optional role at the the end of the string WALRUS
|
||||
tmlist = fixstyle.group(1).strip('\"') # remove quotes, if present
|
||||
for tm in self.rx_person.split(tmlist):
|
||||
if tm.lower() =="":
|
||||
# message = f"! *team {survexblock.survexfile.path} ({survexblock}) NONE PERSON '{line=}'"
|
||||
# print(self.insp + message)
|
||||
# stash_data_issue(
|
||||
# parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
||||
# )
|
||||
pass # does not add any information troggle is interested in
|
||||
else:
|
||||
record_team_member(tm.strip('\"'), survexblock)
|
||||
# else:
|
||||
# message = f"! *team {survexblock.survexfile.path} ({survexblock}) Weird '{fixstyle.group(1)}' strictstyle {line=} {tm=}"
|
||||
# print(self.insp + message)
|
||||
# stash_data_issue(
|
||||
# parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
||||
# )
|
||||
elif nullperson := self.rx_teamabs.match(line): # matches role but no person. Ignore these. WALRUS
|
||||
return
|
||||
elif line.startswith("unknown "):
|
||||
@@ -654,33 +638,19 @@ class LoadingSurvex:
|
||||
parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
||||
)
|
||||
record_team_member(line.replace("unknown ","").strip('\"'), survexblock)
|
||||
elif no_role_person := self.rx_teamone.match(line):
|
||||
nrp = no_role_person.group(1).strip('\"')
|
||||
# message = f"! *team {survexblock.survexfile.path} ({survexblock}) person {nrp=} has no role '{line=}'"
|
||||
# print(self.insp + message)
|
||||
# stash_data_issue(
|
||||
# parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
||||
# )
|
||||
record_team_member(nrp, survexblock)
|
||||
elif no_role_people := self.rx_teamone.match(line):
|
||||
nrp = no_role_people.group(1).strip('\"')
|
||||
for tm in self.rx_person.split(nrp):
|
||||
if tm.lower() =="":
|
||||
pass # does not add any information troggle is interested in
|
||||
else:
|
||||
record_team_member(tm.strip('\"'), survexblock)
|
||||
else:
|
||||
message = f"! *team {survexblock.survexfile.path} ({survexblock}) Bad '{line=}'"
|
||||
print(self.insp + message)
|
||||
stash_data_issue(
|
||||
parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
||||
)
|
||||
# mteammember = self.rx_teammem.match(line) # matches the role at the beginning [deprecated after 24/2/2025]
|
||||
# if not mteammember:
|
||||
# else:
|
||||
# for tm in self.rx_person.split(mteammember.group(2)):
|
||||
# if tm:
|
||||
# record_team_member(tm, survexblock)
|
||||
# else:
|
||||
# if mteammember.group(2).lower() not in ("none", "both"):
|
||||
# message = f"! Weird *team '{mteammember.group(2)}' expostyle line: '{line}' ({survexblock}) {survexblock.survexfile.path}"
|
||||
# print(self.insp + message)
|
||||
# stash_data_issue(
|
||||
# parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
||||
# )
|
||||
|
||||
def LoadSurvexSet(self, survexblock, line):
|
||||
"""survex *set can reset the character for space, decinmal point, field separator
|
||||
|
||||
Reference in New Issue
Block a user