Skip to content

Commit d7f1754

Browse files
authored
Fix to use customized output format (#137)
Signed-off-by: Jiyeong Seok <[email protected]>
1 parent 614195f commit d7f1754

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ lxml
44
virtualenv
55
pyyaml
66
lastversion
7-
fosslight_util>=1.4.21
7+
fosslight_util>=1.4.24
88
PyGithub
99
requirements-parser

src/fosslight_dependency/run_dependency_scanner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
'OSS Version', 'License', 'Download Location',
3131
'Homepage', 'Copyright Text', 'Exclude',
3232
'Comment', 'Dependencies']}
33+
CUSTOMIZED_FORMAT = {'excel': '.xlsx', 'csv': '.csv', 'opossum': '.json', 'yaml': '.yaml',
34+
'spdx-yaml': '.yaml', 'spdx-json': '.json', 'spdx-xml': '.xml',
35+
'spdx-tag': '.tag'}
3336

3437

3538
def find_package_manager():
@@ -80,7 +83,7 @@ def run_dependency_scanner(package_manager='', input_dir='', output_dir_file='',
8083
_json_ext = ".json"
8184
_start_time = datetime.now().strftime('%y%m%d_%H%M')
8285

83-
success, msg, output_path, output_file, output_extension = check_output_format(output_dir_file, format)
86+
success, msg, output_path, output_file, output_extension = check_output_format(output_dir_file, format, CUSTOMIZED_FORMAT)
8487
if success:
8588
if output_path == "":
8689
output_path = os.getcwd()

0 commit comments

Comments
 (0)