vinland-technology / flict

free and open source software license compatibility tool.
GNU General Public License v3.0
45 stars 6 forks source link

Hesa add allowed #359

Closed hesa closed 9 months ago

hesa commented 9 months ago

New option: --licenses-allowed-file, -laf

With this option you can pass a list of licenses to (only) allow as outbound licenses.

This option cannot be used together with --licenses-denied-file, -ldf. Doing so, results in an error.

Examples:

Without any licenses to allow/deny:

$ flict -of text  outbound-candidate  "MIT OR BSD-3-Clause AND (X11)" 
BSD-3-Clause, MIT, X11

Denying MIT using example-data/denied-licenses.json:

$ cat example-data/denied-licenses.json
{
    "licenses_denied": [ "MIT" ]
}
$ flict -of text -ldf example-data/denied-licenses.json  outbound-candidate  "MIT OR BSD-3-Clause AND (X11)" 
BSD-3-Clause, X11

Allowing MIT using the file example-data/allowed-licenses.json:

$ cat example-data/allowed-licenses.json
{
    "licenses_allowed": [ "MIT" ]
}
$ flict -of text -laf example-data/allowed-licenses.json  outbound-candidate  "MIT OR BSD-3-Clause AND (X11)" 
MIT