# Path: sendinel/settings.py
# SMS_SALUTATION = ''


from sendinel.settings import SMS_SALUTATION
                54: "fifty-four",
                55: "fifty-five",
                56: "fifty-six",
                57: "fifty-seven",
                58: "fifty-eigth",
                59: "fifty-nine"}
    
    text = {"date" : days[weekday] + ", " + \
                     order[day] + " of " + \
                     months[month],
            "time" : numbers[hour] + " " + numbers[minutes]}
    
    return  text 

def generate_text(contents, template, is_sms = True):
    """
    creates an sms text from a given template that is not 
    longer than 160 characters
    """
    
    max_chars = 160 - len(SMS_SALUTATION)
    
    contents = replace_dollar_signs(contents)
    sms = template.substitute(contents)
    
    if is_sms:
        if len(sms) > max_chars:
            template_length = len(sms)-get_content_length(contents)
            new_contents = reduce_contents(contents, 
                                           max_chars - template_length)       

# Path: sendinel/settings.py
# SMS_SALUTATION = ''


# Path: sendinel/backend/texthelper.py
from sendinel.settings import SMS_SALUTATION

                54: "fifty-four",
                55: "fifty-five",
                56: "fifty-six",
                57: "fifty-seven",
                58: "fifty-eigth",
                59: "fifty-nine"}
    
    text = {"date" : days[weekday] + ", " + \
                     order[day] + " of " + \
                     months[month],
            "time" : numbers[hour] + " " + numbers[minutes]}
    
    return  text 

def generate_text(contents, template, is_sms = True):
    """
    creates an sms text from a given template that is not 
    longer than 160 characters
    """
    
    max_chars = 160 - len(SMS_SALUTATION)
    
    contents = replace_dollar_signs(contents)
    sms = template.substitute(contents)
    
    if is_sms:
        if len(sms) > max_chars:
            template_length = len(sms)-get_content_length(contents)
            new_contents = reduce_contents(contents, 
                                           max_chars - template_length)       

            sms = SMS_SALUTATION + template.substitute(new_contents)