def get_event_info_str(event_name, season=None): my_config = ScoutingAppMainWebServer.global_config if event_name.startswith("201"): year = event_name[0:4] event_code = event_name[4:] else: if season == None: year = my_config["this_season"] else: year = season event_code = event_name event_dict = WebEventData.get_event_info_dict(my_config, year, event_code) event_info_str = list() if event_dict: event_info_str.append(("Name", event_dict["name"], "string")) event_info_str.append(("Code", event_dict["event_code"].upper(), "string")) event_info_str.append(("Location", event_dict["location"], "string")) event_info_str.append(("Start Date", event_dict["start_date"], "string")) event_info_str.append(("End Date", event_dict["end_date"], "string")) else: event_info_str.append(("Name", "Unknown", "string")) event_info_str.append(("Code", "NONE", "string")) return event_info_str
def get_event_info_str(event_name, season=None): my_config = ScoutingAppMainWebServer.global_config if event_name.startswith('201'): year = event_name[0:4] event_code = event_name[4:] else: if season == None: year = my_config['this_season'] else: year = season event_code = event_name event_dict = WebEventData.get_event_info_dict(my_config, year, event_code) event_info_str=list() if event_dict: event_info_str.append(('Name',event_dict['name'],'string')) event_info_str.append(('Code',event_dict['event_code'].upper(),'string')) event_info_str.append(('Location',event_dict['location'],'string')) event_info_str.append(('Start Date',event_dict['start_date'],'string')) event_info_str.append(('End Date',event_dict['end_date'],'string')) else: event_info_str = None return event_info_str