Skip to content

Commit

Permalink
out-of-the-box custom data extractors templates, cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrj committed Feb 14, 2024
1 parent 8adeaf9 commit 75c20e1
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 128 deletions.
11 changes: 10 additions & 1 deletion src/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,12 @@ def write_repo_info(self):
zip_file.writestr('groups',compressor_compress(dumps(self.groups)))
zip_file.writestr('aliases',compressor_compress(dumps(self.aliases)))

def record_info_alias_wrapper(self,record,orginfo):
if record.file_name in self.aliases:
return f'record alias : {self.aliases[record.file_name]}\n\n' + orginfo
else:
return orginfo

def get_record_alias(self,record):
try:
return self.aliases[record.file_name]
Expand Down Expand Up @@ -2138,7 +2144,7 @@ def find_results_clean(self):

########################################################################################################################

def create_new_record(self,temp_dir,update_callback):
def create_new_record(self,temp_dir,update_callback,group=None):
self.log.info(f'create_new_record')
self_log_info = self.log.info

Expand Down Expand Up @@ -2265,6 +2271,9 @@ def threaded_run(command,results_semi_list,info_semi_list,processes_semi_list):
self.records.remove(new_record)
self_log_info(res)
else:
if group:
self.assign_new_group(new_record,group)

update_callback(new_record)

return True
Expand Down
Loading

0 comments on commit 75c20e1

Please sign in to comment.