Ass WAB/WAI SIGs and extract data from cluster spots. Closes #51

This commit is contained in:
Ian Renton
2025-10-20 11:35:46 +01:00
parent 20977e59cf
commit 86f2aed673
4 changed files with 37 additions and 21 deletions

View File

@@ -7,8 +7,15 @@ def get_icon_for_sig(sig):
return s.icon
return "circle-question"
# Utility function to get the regex string for a SIG reference for a named SIG. If no match is found, None will be returned.
def get_ref_regex_for_sig(sig):
for s in SIGS:
if s.name == sig:
return s.ref_regex
return None
# Regex matching any SIG
ANY_SIG_REGEX = r"(" + r"|".join(list(map(lambda p: p.name, SIGS))) + r")"
# Regex matching any SIG reference
ANY_SIG_REF_REGEX = r"[\w\/]+\-\d+"
ANY_XOTA_SIG_REF_REGEX = r"[\w\/]+\-\d+"