|
| 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