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.

User Guide

๐Ÿ“‹ 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

There are two commands for FOSSLight Source Scanner.

1. fosslight_source

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

Parameter Argument Description
h None Print help message.
p String Path to detect source.
j None As an output, the result of executing ScanCode in json format other than FOSSLight Report is additionally generated.
o String Output file name without file extension.
m None Print the Matched text for each license on a separate sheet.

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

Parameter Argument Description
h None Print help message.
p String Path of ScanCode json files.
o String Output file name without file extension.
m None Print the Matched text for each license on a separate sheet.

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

  • FOSSLight-Report_[datetime].xlsx : FOSSLight Source Scanner result in spreadsheet format.
  • FOSSLight-Report_[datetime]_[sheet_name].csv : FOSSLight Source Scanner result in csv format. (Except Windows)
  • fosslight_src_log_[datetime].txt : The execution log.
  • scancode_[datetime].json : The ScanCode result in case of -j option.