Skip to content

Commit

Permalink
Add TLSH, Checksum column at report
Browse files Browse the repository at this point in the history
  • Loading branch information
bjk7119 committed Mar 22, 2024
1 parent e46dbd7 commit 74af5cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fosslight_util>=1.4.25
fosslight_util>=1.4.37
fosslight_source>=1.6.16
fosslight_binary>=4.1.3
beautifulsoup4
Expand Down
2 changes: 1 addition & 1 deletion src/fosslight_android/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def get_print_items(self):
f"\t{need_check}\t{comment}\t{self.tlsh}\t{self.checksum}")
excel_item = [self.bin_name, source_path, self.notice]
excel_item.extend(item.split('\t'))
excel_item.extend(['', '', '', '', '', comment, need_check])
excel_item.extend(['', '', '', '', '', comment, need_check, self.tlsh, self.checksum])
print_items_excel.append(excel_item)
return print_items_txt, print_items_excel

Expand Down
4 changes: 4 additions & 0 deletions src/fosslight_android/_write_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,24 @@
import logging
from fosslight_util.write_txt import write_txt_file
from fosslight_util.constant import LOGGER_NAME
from fosslight_util.write_excel import hide_column

logger = logging.getLogger(LOGGER_NAME)
HIDDEN_HEADER = ['TLSH', 'Checksum']


def write_result_to_excel(out_file_name, row_list):
header_row = ['ID', 'Binary Name', 'Source Code Path', 'NOTICE.html', 'OSS Name', 'OSS Version', 'License',
'Download Location', 'Homepage',
'Copyright Text',
'License Text', 'Exclude', 'Comment', 'Need Check']
header_row.extend(hidden_header)
sheet_name = "BIN (Android)"
try:
workbook = xlsxwriter.Workbook(out_file_name)
worksheet = create_worksheet(workbook, sheet_name, header_row)
write_result_to_sheet(worksheet, row_list)
hide_column(worksheet, header_row, HIDDEN_HEADER)
workbook.close()
except Exception as ex:
print('* Error :' + str(ex))
Expand Down

0 comments on commit 74af5cc

Please sign in to comment.