diff --git a/requirements.txt b/requirements.txt index 0db958b..367ebf0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -fosslight_util>=1.4.25 +fosslight_util>=1.4.39 fosslight_source>=1.6.16 fosslight_binary>=4.1.3 beautifulsoup4 diff --git a/src/fosslight_android/_common.py b/src/fosslight_android/_common.py index d1f93b4..204140c 100644 --- a/src/fosslight_android/_common.py +++ b/src/fosslight_android/_common.py @@ -135,7 +135,8 @@ def get_print_items(self): f"{oss_name}\t{self.oss_version}\t{self.license}\t{need_check}\t{comment}\t{self.tlsh}\t{self.checksum}") repo_link = self.download_location if self.is_new_bin else "" print_items_excel.append([self.bin_name, source_path, self.notice, oss_name, - self.oss_version, self.license, repo_link, repo_link, '', '', '', comment, need_check]) + self.oss_version, self.license, repo_link, repo_link, '', '', '', comment, + need_check, self.tlsh, self.checksum]) if self.additional_oss_items is not None: for item in self.additional_oss_items: @@ -143,7 +144,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 diff --git a/src/fosslight_android/_write_excel.py b/src/fosslight_android/_write_excel.py index adfd2d3..3ec7e78 100644 --- a/src/fosslight_android/_write_excel.py +++ b/src/fosslight_android/_write_excel.py @@ -7,20 +7,23 @@ 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', 'SHA1'] 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'] + 'License Text', 'Exclude', 'Comment', 'Need Check', 'TLSH', 'SHA1'] 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))