Common.py
def book_transformer(query_input, book_dict_input):
    """grabs the book and casts it to a list"""
    sample_version = versions_dict.versions_dict()
    query_input[1] = query_input[1].replace('[', '').replace(']', '').lstrip().rstrip().upper()
    for i in list(book_dict_input.keys()):
        result = re.search(i, query_input[1])
        if result is not None:
            book = book_dict_input[result.group(0)]
            reduced_query = query_input[1].replace(result.group(0), '')
            return [query_input[0], book, reduced_query]
    return [sample_version['KJV'], 'error book not found']
grabs the book and casts it to a list
grabs the book and casts it to a list
grabs the book and casts it to a list
def book_transformer(query_input, book_dict_input):
    sample_version = versions_dict.versions_dict()
    query_input[1] = query_input[1].replace('[', '').replace(']', '').lstrip().rstrip().upper()
    for i in list(book_dict_input.keys()):
        result = re.search(i, query_input[1])
        if result is not None:
            book = book_dict_input[result.group(0)]
            reduced_query = query_input[1].replace(result.group(0), '')
            return [query_input[0], book, reduced_query]
    return [sample_version['KJV'], 'error book not found']
def book_transformer ( query_input , book_dict_input ) : sample_version = versions_dict . versions_dict ( ) query_input [ 1 ] = query_input [ 1 ] . replace ( '[' , '' ) . replace ( ']' , '' ) . lstrip ( ) . rstrip ( ) . upper ( ) for i in list ( book_dict_input . keys ( ) ) : result = re . search ( i , query_input [ 1 ] ) if result is not None : book = book_dict_input [ result . group ( 0 ) ] reduced_query = query_input [ 1 ] . replace ( result . group ( 0 ) , '' ) return [ query_input [ 0 ] , book , reduced_query ] return [ sample_version [ 'KJV' ] , 'error book not found' ]
grabs the book and casts it to a list
grabs the book and casts it to a list
"""grabs the book and casts it to a list"""
query_input
book_dict_input