Functions for downloading license files from spdx/license-list-data. ArgumentParser) None[source]#

Add arguments to parser. str) str[source]#

Download the license text from the SPDX repository.


spdx_identifier – SPDX identifier of the license.


URLError – if the license could not be downloaded.


The license text. str, destination: str | PathLike, source: str | PathLike | None = None) None[source]#

Download a license and put it in the destination file.

This function exists solely for convenience.

  • spdx_identifier – SPDX License Identifier of the license.

  • destination – Where to put the license.

  • source – Path to file or directory containing the text for LicenseRef licenses.

  • URLError – if the license could not be downloaded.

  • FileExistsError – if the license file already exists.

  • FileNotFoundError – if the source could not be found in the directory. ~argparse.Namespace, project: ~reuse.project.Project, out: ~typing.IO[str] = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) int[source]#

Download license and place it in the LICENSES/ directory.