Skip to content

Commit 1fdfe3e

Browse files
committed
Add file for the help message
1 parent b68da92 commit 1fdfe3e

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

src/fosslight_source/_help.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
# Copyright (c) 2021 LG Electronics Inc.
4+
# SPDX-License-Identifier: Apache-2.0
5+
from fosslight_util.help import PrintHelpMsg
6+
7+
_HELP_MESSAGE_SOURCE = """
8+
Usage: fosslight_source [option1] <arg1> [option2] <arg2>...
9+
10+
FOSSLight Source uses ScanCode, a source code scanner, to detect the copyright and license phrases contained in the file.
11+
Some files (ex- build script), binary files, directory and files in specific directories (ex-test) are excluded from the result.
12+
And removes words such as “-only” and “-old-style” from the license name to be printed. The output result is generated in Excel format.
13+
14+
Options:
15+
Mandatory
16+
-p <source_path>\t\t Path to analyze source
17+
18+
Optional
19+
-h\t\t\t\t Print help message
20+
-j\t\t\t\t Generate additional result of executing ScanCode in json format
21+
-o <file_name>\t\t Output file name"""
22+
23+
_HELP_MESSAGE_CONVERT = """
24+
Usage: fosslight_convert [option1] <arg1> [option2] <arg2>...
25+
26+
FOSSLigtht_convert converts the result of executing ScanCode in json format into OSS Report format.
27+
28+
Options:
29+
Mandatory
30+
-p <path_dir>\t\t Path of ScanCode json files
31+
32+
Optional
33+
-h\t\t\t\t Print help message
34+
-o <file_name>\t\t Output file name"""
35+
36+
37+
def print_help_msg_source():
38+
helpMsg = PrintHelpMsg(_HELP_MESSAGE_SOURCE)
39+
helpMsg.print_help_msg(True)
40+
41+
def print_help_msg_convert():
42+
helpMsg = PrintHelpMsg(_HELP_MESSAGE_CONVERT)
43+
helpMsg.print_help_msg(True)

0 commit comments

Comments
 (0)