def __init__(self, config): self.config = config self.zuul_url = config.get('merger', 'zuul_url') if self.config.has_option('merger', 'git_dir'): merge_root = self.config.get('merger', 'git_dir') else: merge_root = '/var/lib/zuul/git' if self.config.has_option('merger', 'git_user_email'): merge_email = self.config.get('merger', 'git_user_email') else: merge_email = None if self.config.has_option('merger', 'git_user_name'): merge_name = self.config.get('merger', 'git_user_name') else: merge_name = None if self.config.has_option('gerrit', 'sshkey'): sshkey = self.config.get('gerrit', 'sshkey') else: sshkey = None self.merger = merger.Merger(merge_root, sshkey, merge_email, merge_name)
def __init__(self, scriptfile, testfile, options): self.options = options misc.isFileExist(scriptfile) self.scriptfile = scriptfile misc.isFileExist(testfile) self.testfile = testfile cleaner.Cleaner(self.testfile, self.tempdir).clean() merger.Merger(self.scriptfile, self.tempdir, self.options).merge()
def main(): #serialinput = rfid.Parser() #serialinput.run() #ci_file_path = input("Enter the file path to the CI File: ") #rfid_file_path = input("Enter file path to the RFID File: ") mg = merger.Merger( '/Users/sree/PycharmProjects/TEAM/resources/13JAN2021_TEST.csv', '/Users/sree/PycharmProjects/TEAM/resources/RFIDData.csv') mg.merge() print("Thank you!")
def mergeTemp(self, filesToMerge): if not filesToMerge or len(filesToMerge) <= 1: return print "Merging", ', '.join(filesToMerge) m = merger.Merger(self.getFilename()) for file in filesToMerge: m.addFile(file) m.merge() del m
def merge_handler(request): """ Handle requests/responses to and from the merger template """ # Check to see if the client is posting data if request.method == 'POST': # Check to see if client wants to merge files if request.POST.has_key('arguments'): #Get the arguments from the user's request args = request.POST.getlist('arguments')[0] args = args.split(' ')[1:] # Arguments will be made consistent with where data is # stored on the server, as given by DATA_PATH args[0] = ''.join([settings.DATA_PATH, 'templates/', args[0]]) if os.listdir(''.join([settings.DATA_PATH,'bal_count_tot/'])).\ count(''.join([args[1],'.yml'])) == 1: args[1] = ''.join([settings.DATA_PATH, 'bal_count_tot/', args[1]]) else: args[1] = ''.join([settings.DATA_PATH, 'tab_aggr/', args[1]]) if os.listdir(''.join([settings.DATA_PATH, 'bal_count_tot/'])).\ count(''.join([args[2], '.yml'])) == 1: args[2] = ''.join([settings.DATA_PATH, 'bal_count_tot/', args[2]]) else: args[2] = ''.join([settings.DATA_PATH, 'tab_aggr/', args[2]]) fname = args[3] args[3] = ''.join([settings.DATA_PATH, 'tab_aggr/', args[3]]) m = merger.Merger(*args) if m.validate() == True: m.merge(args[3]) # Check to see if client wants to rename a file elif request.POST.has_key('old_name'): rename_file(request.POST) return HttpResponse() c = get_file_data() return render_to_response('merge.html', c, context_instance=RequestContext(request, processors=[settings_processor]))
def process(folders, output, fixed_columns, merge_columns, ignore_columns, remove_content, custom_headers, custom_columns, expect_new_columns, new_columns_regex, separator=u','): ed = editor.Editor() sp = splitter.Splitter(separator) mg = merger.Merger(separator=separator, fixed_columns=fixed_columns, ignore_columns=ignore_columns, merge_columns=merge_columns, expect_new_columns=expect_new_columns, new_columns_regex=new_columns_regex) ed.remove_content_in_processing(remove_content) ed.remove_empty_columns_in_processing() ed.trim_in_processing() ed.expand_rows_in_processing() ed.skip_files_in_processing(output) ed.set_headers_in_processing(custom_headers) for column in custom_columns: ed.add_columns_in_processing(*column) ed.collapse_headers_in_processing(fixed_columns, merge_columns, ignore_columns) for folder in folders: csvs = sp.split_folder(folder) ed.process(folder) mg.merge_folder(folder, output) for files in csvs: easyio.remove(csvs[files])
def __init__(self): self.app = window.Window() self.mrg = merger.Merger(self.app.root) self.btn_commands() self.app.mainloop()
def merge(self): self.merged = merger.Merger(self.ci, self.rfid) self.merged.merge() self.hide()
def __init__(self, args): self.args = args cleaner.Cleaner(self.args, self.tempdir).clean() merger.Merger(self.args, self.tempdir).merge()