Reference

Licence identification

Implemented in src/dex_trove/licenses.py. Text is normalised first: lower-cased, typographic apostrophes replaced, whitespace collapsed.

1. Deny markers (checked first)

If any of these phrases appears, the text is LicenseRef-Proprietary (deny), whatever else it contains:

Marker
governed by your agreement with
users may not
you may not distribute
may not be redistributed
distribute, sublicense, or transfer these materials
does not convey or imply any license
proprietary and confidential
unauthorized copying of this file

2. Fingerprints (in this order)

Phrase(s)SPDXVerdict
gnu affero general public licenseAGPL-3.0-onlydeny
gnu lesser general public licenseLGPL-3.0-onlyreview
gnu general public licenseGPL-2.0-only (if “version 2” and not “version 3”) else GPL-3.0-onlydeny
business source licenseBUSL-1.1deny
server side public licenseSSPL-1.0deny
sil open font licenseOFL-1.1allow
mozilla public licenseMPL-2.0review
apache license + version 2.0Apache-2.0allow
permission is hereby granted, free of charge + the above copyright notice and this permission notice shall be includedMITallow
permission is hereby granted, free of charge (without the notice clause)MIT-0allow
redistribution and use in source and binary forms + neither the nameBSD-3-Clauseallow
redistribution and use in source and binary formsBSD-2-Clauseallow
permission to use, copy, modify, and/or distribute this software for any purpose + the above copyright noticeISCallow
…same, without the notice clause0BSDallow
free and unencumbered software released into the public domainUnlicenseallow
cc0 1.0 universal / creative commons legal code cc0CC0-1.0allow
attribution-noncommercialCC-BY-NC-4.0deny
attribution-noderivatives / attribution-noderivsCC-BY-ND-4.0deny
attribution-sharealike 4.0CC-BY-SA-4.0review
attribution 4.0 internationalCC-BY-4.0allow
boost software licenseBSL-1.0allow
altered source versions must be plainly markedZliballow

3. Fallbacks

ConditionResult
all rights reserved with no fingerprint matchedLicenseRef-Proprietary (deny)
nothing matchedunknown (deny)

Labels and SPDX ids

Frontmatter values and short labels are normalised through aliases, case-insensitively:

InputSPDX
MIT, MIT License, The MIT LicenseMIT
Apache-2.0, Apache 2.0, Apache-2, Apache License 2.0, Apache License, Version 2.0, Apache Software LicenseApache-2.0
BSD-3-Clause, BSD 3-ClauseBSD-3-Clause
CC0, CC0-1.0CC0-1.0
CC BY 4.0, CC-BY-4.0CC-BY-4.0
GPL-3.0, GPL-2.0, AGPL-3.0, LGPL-3.0the -only forms

Any other well-formed token (e.g. EPL-2.0) is kept as-is, and its verdict comes from the prefix rules. Free text that isn’t an id, such as Complete terms in LICENSE.txt, returns no answer, and resolution falls through to the item’s licence file. Any value containing proprietary is denied.

Expressions

ExpressionRule
A OR Bbest branch (allow > review > deny)
A AND Bworst branch; allowed only if every branch is
A WITH exceptionevaluated as A
(…)outer parentheses stripped

Licence files

PurposeFilenames (case-insensitive)
Item / ancestor / repo licenceLICENSE, LICENCE, COPYING, UNLICENSE, optionally followed by ., - or _ and anything (LICENSE.txt, LICENSE-MIT)
Nested component licencesLICENSE*, COPYING*, *-OFL.txt, *.OFL.txt, OFL.txt anywhere inside the item

Lines starting with Copyright or © are extracted (up to three), except lines that are licence prose (containing license, notice, owner, holder, statement, permission, the above or [).

Try it

dex license ./LICENSE
dex license path/to/skill/        # every licence file directly in the folder

Edit this page on GitHub ↗