mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 14:58:17 +00:00
Now matching 2025 survex standard *team
This commit is contained in:
@@ -568,8 +568,8 @@ class LoadingSurvex:
|
|||||||
return
|
return
|
||||||
|
|
||||||
def LoadSurvexTeam(self, survexblock, line):
|
def LoadSurvexTeam(self, survexblock, line):
|
||||||
"""Interpeting the *team fields means interpreting older style survex as well as current survex standard,
|
"""Interpeting the *team fields has been updated to current 2025 survex standard,
|
||||||
*team Insts Anthony Day - this is how most of our files specify the team member
|
*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
|
*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
|
We have a huge variety of abbreviations and mispellings. The most laconic being
|
||||||
*team gb, bl
|
*team gb, bl
|
||||||
@@ -621,30 +621,14 @@ class LoadingSurvex:
|
|||||||
message = (
|
message = (
|
||||||
f"- Team before Date: {line} ({survexblock}) {survexblock.survexfile.path}"
|
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
|
# 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
|
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
|
tmlist = fixstyle.group(1).strip('\"') # remove quotes, if present
|
||||||
for tm in self.rx_person.split(tmlist):
|
for tm in self.rx_person.split(tmlist):
|
||||||
if tm.lower() =="":
|
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
|
pass # does not add any information troggle is interested in
|
||||||
else:
|
else:
|
||||||
record_team_member(tm.strip('\"'), survexblock)
|
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
|
elif nullperson := self.rx_teamabs.match(line): # matches role but no person. Ignore these. WALRUS
|
||||||
return
|
return
|
||||||
elif line.startswith("unknown "):
|
elif line.startswith("unknown "):
|
||||||
@@ -654,33 +638,19 @@ class LoadingSurvex:
|
|||||||
parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
||||||
)
|
)
|
||||||
record_team_member(line.replace("unknown ","").strip('\"'), survexblock)
|
record_team_member(line.replace("unknown ","").strip('\"'), survexblock)
|
||||||
elif no_role_person := self.rx_teamone.match(line):
|
elif no_role_people := self.rx_teamone.match(line):
|
||||||
nrp = no_role_person.group(1).strip('\"')
|
nrp = no_role_people.group(1).strip('\"')
|
||||||
# message = f"! *team {survexblock.survexfile.path} ({survexblock}) person {nrp=} has no role '{line=}'"
|
for tm in self.rx_person.split(nrp):
|
||||||
# print(self.insp + message)
|
if tm.lower() =="":
|
||||||
# stash_data_issue(
|
pass # does not add any information troggle is interested in
|
||||||
# parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
else:
|
||||||
# )
|
record_team_member(tm.strip('\"'), survexblock)
|
||||||
record_team_member(nrp, survexblock)
|
|
||||||
else:
|
else:
|
||||||
message = f"! *team {survexblock.survexfile.path} ({survexblock}) Bad '{line=}'"
|
message = f"! *team {survexblock.survexfile.path} ({survexblock}) Bad '{line=}'"
|
||||||
print(self.insp + message)
|
print(self.insp + message)
|
||||||
stash_data_issue(
|
stash_data_issue(
|
||||||
parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
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):
|
def LoadSurvexSet(self, survexblock, line):
|
||||||
"""survex *set can reset the character for space, decinmal point, field separator
|
"""survex *set can reset the character for space, decinmal point, field separator
|
||||||
|
|||||||
Reference in New Issue
Block a user