def transform_eventlog(path): outpath = path + '.tsv' mapper = flow_lib.FlowGraphMapper() flow_lib.process_flow_data(path, flow_lib.parse_event_log, mapper.transform_flow) mapper.store_graph(outpath) mapper.store_mapping(outpath + '.map') return
def transform_unb(path): outpath = path + '.tsv' mapper = flow_lib.FlowGraphMapper() flow_lib.process_flow_data(path, flow_lib.parse_flo, mapper.transform_flow) mapper.store_graph(outpath) mapper.store_mapping(outpath + '.map') return mapper.get_id_mapper()
def build_access_control_graph(raw_path): graph_builder = AccessControlGraphBuilder() flow_lib.process_flow_data(raw_path, flow_lib.parse_event_log, graph_builder.transform) out_dir = '/Users/d3m432/tmp' out_file = os.path.basename(raw_path) out_path = out_dir + '/' + out_file + '.csv' graph_builder.store(out_path)
def build_access_control_graphs(raw_dir, out_dir): files = os.listdir(raw_dir) for f in files: if f.endswith('.dmp.gr') raw_path = dirpath + '/' + f graph_builder = AccessControlGraphBuilder() flow_lib.process_flow_data(raw_path, flow_lib.parse_event_log, graph_builder.transform) out_file = os.path.basename(raw_path) out_path = out_dir + '/' + out_file + '.csv' graph_builder.store(out_path)