from .numeric_value_parser import NumericValueParser


def save_html(content, dir):
    text_file = open(dir,'w')
    text_file.write(content)
    text_file.close()


def extract_value_from_table(content, report, table, column_name, row_name, reportFor = "EntireFacility"):
    parser = NumericValueParser(report, table, column_name, row_name, reportFor)
    parser.feed(content)
    return {'value':parser.data, 'unit':parser.unit}

###############LOCAL TEST########################
#tableReader = NumericValueParser('Climatic Data Summary','Sizing Period Design Day','Maximum Dry Bulb','CHICAGO ANN HTG 99.6% CONDNS DB')
#file = open('testTable.html', 'r') 
#tableReader.feed(file.read())
#print(tableReader.data)
#print(tableReader.unit)

2f7d7917ec20c85e0d4d931f1c631b676949d4c2
<mask token>

<mask token>


def extract_value_from_table(content, report, table, column_name, row_name,
    reportFor='EntireFacility'):
    parser = NumericValueParser(report, table, column_name, row_name, reportFor
        )
    parser.feed(content)
    return {'value': parser.data, 'unit': parser.unit}

<mask token>


def save_html(content, dir):
    text_file = open(dir, 'w')
    text_file.write(content)
    text_file.close()


def extract_value_from_table(content, report, table, column_name, row_name,
    reportFor='EntireFacility'):
    parser = NumericValueParser(report, table, column_name, row_name, reportFor
        )
    parser.feed(content)
    return {'value': parser.data, 'unit': parser.unit}

from .numeric_value_parser import NumericValueParser


def save_html(content, dir):
    text_file = open(dir, 'w')
    text_file.write(content)
    text_file.close()


def extract_value_from_table(content, report, table, column_name, row_name,
    reportFor='EntireFacility'):
    parser = NumericValueParser(report, table, column_name, row_name, reportFor
        )
    parser.feed(content)
    return {'value': parser.data, 'unit': parser.unit}

from .numeric_value_parser import NumericValueParser


def save_html(content, dir):
    text_file = open(dir,'w')
    text_file.write(content)
    text_file.close()


def extract_value_from_table(content, report, table, column_name, row_name, reportFor = "EntireFacility"):
    parser = NumericValueParser(report, table, column_name, row_name, reportFor)
    parser.feed(content)
    return {'value':parser.data, 'unit':parser.unit}

###############LOCAL TEST########################
#tableReader = NumericValueParser('Climatic Data Summary','Sizing Period Design Day','Maximum Dry Bulb','CHICAGO ANN HTG 99.6% CONDNS DB')
#file = open('testTable.html', 'r') 
#tableReader.feed(file.read())
#print(tableReader.data)
#print(tableReader.unit)
