diff --git a/README.md b/README.md index bebcf55..f836b69 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The primary purpose of this software is to enable users to catalog their files, ![image info](./info/menu.png) ## [Download](https://github.com/PJDude/librer/releases) ## -Portable executable packages created with [PyInstaller](https://pyinstaller.org/en/stable) for **Linux** and **Windows** can be downloaded from the Releases site. +Portable executable packages created with [PyInstaller](https://pyinstaller.org/en/stable) for **Linux** and **Windows** can be downloaded from the Releases site. Simultaneously, on **nuitka** branch, builds are made with [nuitka](https://github.com/Nuitka/Nuitka) compiler with its all pros and cons. These builds are marked as Pre-release and have separate build counter. ## [MAJORGEEKS review](https://www.majorgeeks.com/files/details/librer.html) ## diff --git a/src/core.py b/src/core.py index 37c1fb3..479b7a9 100644 --- a/src/core.py +++ b/src/core.py @@ -1709,12 +1709,12 @@ def import_records_wii_do(self,compr,postfix,label,quant_files,quant_folders,fil new_record = self.create() - expressions='WII_import' + expressions='' use_smin=False smin_int=0 use_smax=False smax_int=0 - executable='WII_import' + executable='' parameters='' shell=False timeout=0 @@ -1722,7 +1722,7 @@ def import_records_wii_do(self,compr,postfix,label,quant_files,quant_folders,fil new_record.header.cde_list = [ [expressions,use_smin,smin_int,use_smax,smax_int,executable,parameters,shell,timeout,crc] ] - new_record.header.scan_path = 'WII_import' + new_record.header.scan_path = ' -- Imported from "Where Is It? -- ' new_record.customdata = [(0,0,cd_elem) for cd_elem in cd_set] @@ -1735,7 +1735,7 @@ def import_records_wii_do(self,compr,postfix,label,quant_files,quant_folders,fil new_record.filenames = tuple(sorted(list(filenames_set))) new_record.header.label = label - new_record.header.scan_path = 'WII import' + new_record.filenames_helper = {fsname:fsname_index for fsname_index,fsname in enumerate(new_record.filenames)} new_record.header.quant_files = quant_files @@ -1767,6 +1767,7 @@ def import_records_wii_do(self,compr,postfix,label,quant_files,quant_folders,fil new_record.header.quant_folders = sub_folders_quant new_record.header.items_names=len(new_record.filenames) + new_record.header.items_cd=len(new_record.customdata) new_record.filestructure = ('',code,sub_size,mtime,new_record.tupelize_rec(scan_like_data,print)) diff --git a/src/librer.py b/src/librer.py index 3fdfbbd..f804e2a 100644 --- a/src/librer.py +++ b/src/librer.py @@ -1460,7 +1460,7 @@ def get_wii_import_dialog(self): self.wii_import_compr_var.set(9) self.wii_import_compr_var_int.set(9) - self.wii_import_label_var.set('WII-imported') + self.wii_import_brief_label=Label(self.wii_import_dialog.area_main,text='',bd=2,bg=self.bg_color,takefocus=False,relief='groove',anchor='w',justify='left') self.wii_import_brief_label.grid(row=0,column=0,sticky='news',padx=4,pady=4,columnspan=2) @@ -1880,9 +1880,11 @@ def record_import_wii(self): ########################### dialog = self.get_wii_import_dialog() - #self.wii_import_label_var.set(self.current_record.header.label) - self.wii_import_compr_var.set(9) - self.wii_import_compr_var_int.set(9) + if len(import_filenames)>1: + self.wii_import_label_var.set(f'WII-imported-multiple-files') + else: + self.wii_import_label_var.set(f'WII-imported-{Path(import_filenames[0]).stem}') + self.wii_import_brief_label.configure(text=f'GATHERED DATA:\ndisks : {fnumber(quant_disks)}\nfiles : {fnumber(quant_files)}\nfolders : {fnumber(quant_folders)}') dialog.show() @@ -4005,7 +4007,7 @@ def single_record_show(self,record): sum_size+=record_temp.header.sum_size quant_files+=record_temp.header.quant_files - self.widget_tooltip(self.status_records_all,f'All records in repository : {records_len}\nSum data size : {bytes_to_str(sum_size)}\nSum files quantity : {fnumber(quant_files)}\n\nClick to unload (free memory) data of selected record\nDouble click to unload data of all records.') + self.widget_tooltip(self.status_records_all,f'Records in repository : {records_len}\nSum data size : {bytes_to_str(sum_size)}\nSum files quantity : {fnumber(quant_files)}\n\nClick to unload (free memory) data of selected record\nDouble click to unload data of all records.') self.main_update() @@ -4055,6 +4057,7 @@ def show_customdata(self): if self.actions_processing: item=self.tree.focus() if item: + error_infos=[] try: if self.tree.tag_has(self.RECORD,item) or self.tree.tag_has(self.RECORD_RAW,item): self.record_info() @@ -4070,11 +4073,12 @@ def show_customdata(self): if has_cd: #wiec nie has_files cd_index = data_tuple[4] + error_infos.append(f'{cd_index=},type:{type(cd_index)}') self.access_customdata(record) - cd_field = record.customdata[cd_index] + error_infos.append(' '.join(str(cd_field))) if cd_data := cd_field[2]: rule_nr=cd_field[0] returncode=cd_field[1] @@ -4083,7 +4087,7 @@ def show_customdata(self): file_path = normpath(sep.join([record.header.scan_path,sep.join(subpath_list)])) - cd_txt = cd_data + cd_txt = str(cd_data) command,command_info = get_command(executable,parameters,file_path,shell) @@ -4095,7 +4099,7 @@ def show_customdata(self): self.info_dialog_on_main.show('Information','No Custom data.') except Exception as e: - self.info_dialog_on_main.show('Custom Data Info Error',str(e)) + self.info_dialog_on_main.show('Custom Data Info Error',str(e) + ('\n' + '\n'.join(error_infos)) if error_infos else '') def record_info(self): if self.actions_processing: