Skip to content

Commit d4e2265

Browse files
committed
Add TLSH, Checksum column at report
1 parent e46dbd7 commit d4e2265

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
fosslight_util>=1.4.25
1+
fosslight_util>=1.4.39
22
fosslight_source>=1.6.16
33
fosslight_binary>=4.1.3
44
beautifulsoup4

src/fosslight_android/_common.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,16 @@ def get_print_items(self):
135135
f"{oss_name}\t{self.oss_version}\t{self.license}\t{need_check}\t{comment}\t{self.tlsh}\t{self.checksum}")
136136
repo_link = self.download_location if self.is_new_bin else ""
137137
print_items_excel.append([self.bin_name, source_path, self.notice, oss_name,
138-
self.oss_version, self.license, repo_link, repo_link, '', '', '', comment, need_check])
138+
self.oss_version, self.license, repo_link, repo_link, '', '', '', comment,
139+
need_check, self.tlsh, self.checksum])
139140

140141
if self.additional_oss_items is not None:
141142
for item in self.additional_oss_items:
142143
print_items_txt.append(f"{self.bin_name}\t{source_path}\t{self.notice}\t{item}"
143144
f"\t{need_check}\t{comment}\t{self.tlsh}\t{self.checksum}")
144145
excel_item = [self.bin_name, source_path, self.notice]
145146
excel_item.extend(item.split('\t'))
146-
excel_item.extend(['', '', '', '', '', comment, need_check])
147+
excel_item.extend(['', '', '', '', '', comment, need_check, self.tlsh, self.checksum])
147148
print_items_excel.append(excel_item)
148149
return print_items_txt, print_items_excel
149150

src/fosslight_android/_write_excel.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,23 @@
77
import logging
88
from fosslight_util.write_txt import write_txt_file
99
from fosslight_util.constant import LOGGER_NAME
10+
from fosslight_util.write_excel import hide_column
1011

1112
logger = logging.getLogger(LOGGER_NAME)
13+
HIDDEN_HEADER = ['TLSH', 'SHA1']
1214

1315

1416
def write_result_to_excel(out_file_name, row_list):
1517
header_row = ['ID', 'Binary Name', 'Source Code Path', 'NOTICE.html', 'OSS Name', 'OSS Version', 'License',
1618
'Download Location', 'Homepage',
1719
'Copyright Text',
18-
'License Text', 'Exclude', 'Comment', 'Need Check']
20+
'License Text', 'Exclude', 'Comment', 'Need Check', 'TLSH', 'SHA1']
1921
sheet_name = "BIN (Android)"
2022
try:
2123
workbook = xlsxwriter.Workbook(out_file_name)
2224
worksheet = create_worksheet(workbook, sheet_name, header_row)
2325
write_result_to_sheet(worksheet, row_list)
26+
hide_column(worksheet, header_row, HIDDEN_HEADER)
2427
workbook.close()
2528
except Exception as ex:
2629
print('* Error :' + str(ex))

0 commit comments

Comments
 (0)