mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Ass WAB/WAI SIGs and extract data from cluster spots. Closes #51
This commit is contained in:
@@ -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+"
|
||||
Reference in New Issue
Block a user