FOSSLight Source Scanner

FOSSLight Source is released under the Apache-2.0 License. Current python package version. REUSE status

FOSSLight Source Scanner uses ScanCode, a source code scanner, to detect the copyright and license phrases contained in the file. Some files (ex- build script), binary files, directory and files in specific directories (ex-test) are excluded from the result. And removes words such as "-only" and "-old-style" from the license name to be printed. The output result is generated in spreadsheet format.

Github Repository : https://github.com/fosslight/fosslight_source_scanner
License : Apache-2.0

Contents

๐Ÿ“‹ Prerequisite

FOSSLight Source Scanner needs a Python 3.6+.
For windows, you need to install Microsoft Visual C++ Build Tools.

๐ŸŽ‰ How to install

It can be installed using pip3. It is recommended to install it in the python 3.6 + virtualenv environment.

$ pip3 install fosslight_source

๐Ÿš€ How to run

1. fosslight_source

After executing ScanCode, the source code scanner, print the FOSSLight Report.

$ fosslight_source [option] <arg>

Options

  Mandatory
    -p <source_path>               Path to analyze source

  Optional
    -h                             Print help message
    -j                             Generate additional result of executing ScanCode in json format
    -m                             Print the Matched text for each license on a separate sheet
    -o <output_path>               Output path
                                    (If you want to generate the specific file name, add the output path with file name.)
    -f <format>                    Output file format (excel, csv, opossum)

Example

Print result to FOSSLight Report and json file

$ fosslight_source -p /home/source_path -j

2. fosslight_convert

Converts the result of executing ScanCode in json format into FOSSLight Report format.

$ fosslight_convert [option] <arg>

Options

  Mandatory
    -p <path_dir>                  Path of ScanCode json files

  Optional
      -h                             Print help message
      -m                             Print the Matched text for each license on a separate sheet
      -o <output_path>               Output path
                                      (If you want to generate the specific file name, add the output path with file name.)
      -f <format>                    Output file format (excel, csv, opossum)

Example

Converting scancode json result to FOSSLight report

$ fosslight_convert -p /home/jsonfile_dir

๐Ÿ“ Result

$ tree
.
โ”œโ”€โ”€ FOSSLight-Report_2021-05-03_00-39-49_SRC.csv
โ”œโ”€โ”€ FOSSLight-Report_2021-05-03_00-39-49.xlsx
โ”œโ”€โ”€ scancode_2021-05-03_00-39-49.json
โ”œโ”€โ”€ fosslight_src_log_2021-05-03_00-39-49.txt
โ””โ”€โ”€ Opossum_input_2021-05-03_00-39-49.json
  • FOSSLight-Report_[datetime].xlsx : FOSSLight Source Scanner result in spreadsheet format.
  • FOSSLight-Report_[datetime]_[sheet_name].csv : FOSSLight Source Scanner result in csv format.
  • fosslight_src_log_[datetime].txt : The execution log.
  • scancode_[datetime].json : The ScanCode result in case of -j option.
  • Opossum_input_[datetime].json : FOSSLight Source Scanner result for OpossumUI