# Path: nhlscrapi/scrapr/teamnameparser.py
# def team_abbr_parser(abr):
#   abr = abr.replace('.','')
# 
#   # keep abr if already in good shape
#   if abr in ABB:
#     return abr
#     
#   if abr in __abbr_alts:
#     return __abbr_alts[abr]
#     
#   #print 'UNKNOWN ABBREVIATION: %s' % abr
#   return abr


from nhlscrapi.scrapr.teamnameparser import team_abbr_parser
import re
def default_desc_parser(event):
    pass

#############################
##
## helper funcs
##
#############################
# get int distance from 'num ft.'
def get_ft(s, def_dist = -1):
    sd = s.split(" ")[0]
  
    return int(sd) if sd.isdigit() else def_dist
  
  
# def team_num_name(s):
#     tnn = s.split(" ")
#     tnn[1] = tnn[1].replace('#','')
#     tnn[1] = int(tnn[1]) if tnn[1].isdigit() else -1
  
#     return {
#         "team": team_abbr_parser(tnn[0]),
#         "num": tnn[1],
#         "name": ' '.join(tnn[2:])
#     }
__num_name_re = re.compile('([0-9]*)(.*)')

def team_num_name(s):
    # error report 600 and error report 672
    tnn = s.split("#")

# Path: nhlscrapi/scrapr/teamnameparser.py
# def team_abbr_parser(abr):
#   abr = abr.replace('.','')
# 
#   # keep abr if already in good shape
#   if abr in ABB:
#     return abr
#     
#   if abr in __abbr_alts:
#     return __abbr_alts[abr]
#     
#   #print 'UNKNOWN ABBREVIATION: %s' % abr
#   return abr


# Path: nhlscrapi/scrapr/descparser.py
from nhlscrapi.scrapr.teamnameparser import team_abbr_parser
import re

def default_desc_parser(event):
    pass

#############################
##
## helper funcs
##
#############################
# get int distance from 'num ft.'
def get_ft(s, def_dist = -1):
    sd = s.split(" ")[0]
  
    return int(sd) if sd.isdigit() else def_dist
  
  
# def team_num_name(s):
#     tnn = s.split(" ")
#     tnn[1] = tnn[1].replace('#','')
#     tnn[1] = int(tnn[1]) if tnn[1].isdigit() else -1
  
#     return {
#         "team": team_abbr_parser(tnn[0]),
#         "num": tnn[1],
#         "name": ' '.join(tnn[2:])
#     }
__num_name_re = re.compile('([0-9]*)(.*)')

def team_num_name(s):
    # error report 600 and error report 672
    tnn = s.split("#")

    team = team_abbr_parser(tnn[0].strip())