mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Now that SIGs are rebranded as Activities, we can merge DXpedition and Contest into that without it being too weird, and get rid of AlertType #147
This commit is contained in:
@@ -11,6 +11,15 @@ def get_ref_regex_for_activity(activity):
|
||||
return None
|
||||
|
||||
|
||||
def get_icon_for_activity(activity):
|
||||
"""Utility function to get the icon for a named activity. If no match is found, None will be returned."""
|
||||
|
||||
for a in ACTIVITIES:
|
||||
if a.name.upper() == activity.upper():
|
||||
return a.icon
|
||||
return None
|
||||
|
||||
|
||||
def get_activity_name_from_comment_name(activity):
|
||||
"""Utility function to get the name of an activity from its "comment name". Generally these will be the same
|
||||
but there are some cases (e.g. is "TOTA" Towers, Tiles or Toilets?) where we need to transform one to the
|
||||
|
||||
Reference in New Issue
Block a user