Skip to content

Commit d011184

Browse files
author
piotrj
committed
minor improvements.
1 parent 2ffdee3 commit d011184

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The primary purpose of this software is to enable users to catalog their files,
1717
![image info](./info/menu.png)
1818

1919
## [Download](https://github.com/PJDude/librer/releases) ##
20-
Portable executable packages created with [PyInstaller](https://pyinstaller.org/en/stable) for **Linux** and **Windows** can be downloaded from the Releases site.
20+
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.
2121

2222
## [MAJORGEEKS review](https://www.majorgeeks.com/files/details/librer.html) ##
2323

src/core.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1709,20 +1709,20 @@ def import_records_wii_do(self,compr,postfix,label,quant_files,quant_folders,fil
17091709

17101710
new_record = self.create()
17111711

1712-
expressions='WII_import'
1712+
expressions=''
17131713
use_smin=False
17141714
smin_int=0
17151715
use_smax=False
17161716
smax_int=0
1717-
executable='WII_import'
1717+
executable=''
17181718
parameters=''
17191719
shell=False
17201720
timeout=0
17211721
crc=False
17221722

17231723
new_record.header.cde_list = [ [expressions,use_smin,smin_int,use_smax,smax_int,executable,parameters,shell,timeout,crc] ]
17241724

1725-
new_record.header.scan_path = 'WII_import'
1725+
new_record.header.scan_path = ' -- Imported from "Where Is It? -- '
17261726

17271727
new_record.customdata = [(0,0,cd_elem) for cd_elem in cd_set]
17281728

@@ -1735,7 +1735,7 @@ def import_records_wii_do(self,compr,postfix,label,quant_files,quant_folders,fil
17351735

17361736
new_record.filenames = tuple(sorted(list(filenames_set)))
17371737
new_record.header.label = label
1738-
new_record.header.scan_path = 'WII import'
1738+
17391739
new_record.filenames_helper = {fsname:fsname_index for fsname_index,fsname in enumerate(new_record.filenames)}
17401740

17411741
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
17671767
new_record.header.quant_folders = sub_folders_quant
17681768

17691769
new_record.header.items_names=len(new_record.filenames)
1770+
new_record.header.items_cd=len(new_record.customdata)
17701771

17711772
new_record.filestructure = ('',code,sub_size,mtime,new_record.tupelize_rec(scan_like_data,print))
17721773

src/librer.py

+12-8
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ def get_wii_import_dialog(self):
14601460

14611461
self.wii_import_compr_var.set(9)
14621462
self.wii_import_compr_var_int.set(9)
1463-
self.wii_import_label_var.set('WII-imported')
1463+
14641464

14651465
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')
14661466
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):
18801880
###########################
18811881
dialog = self.get_wii_import_dialog()
18821882

1883-
#self.wii_import_label_var.set(self.current_record.header.label)
1884-
self.wii_import_compr_var.set(9)
1885-
self.wii_import_compr_var_int.set(9)
1883+
if len(import_filenames)>1:
1884+
self.wii_import_label_var.set(f'WII-imported-multiple-files')
1885+
else:
1886+
self.wii_import_label_var.set(f'WII-imported-{Path(import_filenames[0]).stem}')
1887+
18861888
self.wii_import_brief_label.configure(text=f'GATHERED DATA:\ndisks : {fnumber(quant_disks)}\nfiles : {fnumber(quant_files)}\nfolders : {fnumber(quant_folders)}')
18871889

18881890
dialog.show()
@@ -4005,7 +4007,7 @@ def single_record_show(self,record):
40054007
sum_size+=record_temp.header.sum_size
40064008
quant_files+=record_temp.header.quant_files
40074009

4008-
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.')
4010+
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.')
40094011

40104012
self.main_update()
40114013

@@ -4055,6 +4057,7 @@ def show_customdata(self):
40554057
if self.actions_processing:
40564058
item=self.tree.focus()
40574059
if item:
4060+
error_infos=[]
40584061
try:
40594062
if self.tree.tag_has(self.RECORD,item) or self.tree.tag_has(self.RECORD_RAW,item):
40604063
self.record_info()
@@ -4070,11 +4073,12 @@ def show_customdata(self):
40704073

40714074
if has_cd: #wiec nie has_files
40724075
cd_index = data_tuple[4]
4076+
error_infos.append(f'{cd_index=},type:{type(cd_index)}')
40734077

40744078
self.access_customdata(record)
4075-
40764079
cd_field = record.customdata[cd_index]
40774080

4081+
error_infos.append(' '.join(str(cd_field)))
40784082
if cd_data := cd_field[2]:
40794083
rule_nr=cd_field[0]
40804084
returncode=cd_field[1]
@@ -4083,7 +4087,7 @@ def show_customdata(self):
40834087

40844088
file_path = normpath(sep.join([record.header.scan_path,sep.join(subpath_list)]))
40854089

4086-
cd_txt = cd_data
4090+
cd_txt = str(cd_data)
40874091

40884092
command,command_info = get_command(executable,parameters,file_path,shell)
40894093

@@ -4095,7 +4099,7 @@ def show_customdata(self):
40954099
self.info_dialog_on_main.show('Information','No Custom data.')
40964100

40974101
except Exception as e:
4098-
self.info_dialog_on_main.show('Custom Data Info Error',str(e))
4102+
self.info_dialog_on_main.show('Custom Data Info Error',str(e) + ('\n' + '\n'.join(error_infos)) if error_infos else '')
40994103

41004104
def record_info(self):
41014105
if self.actions_processing:

0 commit comments

Comments
 (0)