mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
14 lines
451 B
Python
14 lines
451 B
Python
from core.constants import SIGS
|
|
|
|
# Utility function to get the icon for a named SIG. If no match is found, the "circle-question" icon will be returned.
|
|
def get_icon_for_sig(sig):
|
|
for s in SIGS:
|
|
if s.name == sig:
|
|
return s.icon
|
|
return "circle-question"
|
|
|
|
# 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+" |