spdx-tool scans the source files to identify licenses and allows to update them in order to use the SPDX license format. It can be used to:
Identify licenses used in a project:
spdx-toolIdentify files matching a given license:
spdx-tool --only-licenses=Apache-2.0 -fCheck the license header before replacing it:
spdx-tool --only-licenses=Apache-2.0 --print-license --line-number srcReplace the license header by the SPDX-License-Identifier header:
spdx-tool --only-licenses=Apache-2.0 --update=spdx srcBuild an XML or JSON report of files with their licenses:
spdx-tool --output-xml=report.xmlGlobally install this crate:
alr install spdx_toolAdd to your project:
alr with spdx_toolDependencies: 0
Dependents: 0
Versions: 1