def build_data_list(dump_names, opppy_dump_parser, key_words=None): ''' This function generates a opppy output dictionary data from an output file. args: args - Parsed input arguments ''' # build a new dictionary dictionary_data = [] total = len(dump_names) count = 0 for dump in dump_names: # append new dictionary data to the pickle file dictionary_data.append(opppy_dump_parser.build_data_dictionary(dump,key_words)) count += 1 progress(count,total, 'of dump files read') return dictionary_data
def append_dumps(data, dump_files, opppy_parser, key_words=None): ''' Append output data from a list of output_files to a user provided dictionary using a user proved opppy_parser Input options: data opppy input dictionary to be append to (must have a 'verion' opppy key) output_files a list of output files to parse opppy_parser a user defined OPPPY parser for the output files append_date bool to specify if the data should be appended to the file name for tracking purposes ''' total = len(dump_files) count = 0 for dump in dump_files: # append new dictionary data to the pickle file data[dump.split('/')[-1]] = opppy_parser.build_data_dictionary(dump,key_words) count += 1 progress(count,total, 'of dump files read') print('') print('') print_dump_dictionary_data(data)