Skip to content

Commit 9f91bf5

Browse files
Merge pull request #3100 from nexB/add-license-dump-option
Add license dump option
2 parents c108206 + c857fa4 commit 9f91bf5

File tree

69,814 files changed

+291846
-178710
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69,814 files changed

+291846
-178710
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,20 @@ tcl
9595
/00-*.txt
9696
/z-todo-licenses-*
9797

98+
# Extra ignores from licensedb
99+
*.pyc
100+
*.db
101+
.installed.cfg
102+
parts
103+
develop-eggs
104+
eggs
105+
downloads
106+
.settings
107+
TAGS
108+
Procfile
109+
local.cfg
110+
geckodriver.log
111+
var
112+
.metaflow
113+
selenium
114+
/dist/

CHANGELOG.rst

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,30 @@ License detection:
5353
detected license only once. This data can contain the reference license text
5454
as an option.
5555

56-
- We can now detect licenses using custom license texts and license rules.
57-
These can be provided as a one off in a directory or packaged as a plugin
58-
for consistent reuse and deployment.
59-
6056
- There is a new "scancode-reindex-licenses" command that replace the
6157
"scancode --reindex-licenses" command line option which has been
6258
removed. This new command supports simpler reindexing using custom
6359
license texts and license rules contributed by plugins or stored in an
64-
additional directory.
60+
additional directory. The "--reindex-licenses-for-all-languages" CLI option
61+
is also moved to the "scancode-reindex-licenses" command as an option
62+
"--all-languages".
63+
64+
- We can now detect licenses using custom license texts and license rules.
65+
These can be provided as a one off in a directory or packaged as a plugin
66+
for consistent reuse and deployment. There is an option "--additional-directory"
67+
with the "scancode-reindex-licenses" command and also a new "--only-builtin"
68+
option to only use the builtin licenses to build the cache.
69+
70+
- Scancode LICENSE and RULE files now also contain their data as YAML frontmatter,
71+
which previously used to be in their respective YAML files. This reduces number of
72+
files in those directories, 'rules' and 'licenses' to half. Git line history is
73+
preserved for the files.
74+
75+
- A new command line option "--get-license-data" is added to dump license data in
76+
JSON, YAML and HTML formats, and also generates a local index and a static website
77+
to view the data. This will essentially be an API/way to get scancode license data
78+
as opposed to just reading the files.
79+
6580

6681
Package detection:
6782
~~~~~~~~~~~~~~~~~~~~~

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ pygmars==0.7.0
5656
Pygments==2.12.0
5757
pymaven-patch==0.3.0
5858
pyparsing==3.0.9
59+
python-frontmatter==1.0.0
5960
pytz==2022.1
6061
PyYAML==6.0
6162
rdflib==6.2.0

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ install_requires =
101101
pygmars >= 0.7.0
102102
pygments
103103
pymaven_patch >= 0.2.8
104+
python-frontmatter >= 1.0.0
104105
requests >= 2.7.0
105106
saneyaml >= 0.5.2
106107
spdx_tools >= 0.7.0a3
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
---
2+
license_expression: free-unknown
3+
relevance: 100
4+
notes: |
5+
License test derived from a file of the BSD-licensed repository at:
6+
https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/ccurls.t1
7+
originally expected to be detected as LiLiQ-P-1.1
8+
with coverage of 0
9+
This is a URL test extracted from ccurls.t1.
10+
---
11+
112
http://opensource.org/licenses/liliq-p-1.1

src/licensedcode/data/inactive/rules/free-unknown_url_glc_90.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
---
2+
license_expression: free-unknown
3+
relevance: 100
4+
notes: |
5+
License test derived from a file of the BSD-licensed repository at:
6+
https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/ccurls.t1
7+
originally expected to be detected as LiLiQ-P-1.1
8+
with coverage of 0
9+
This is a URL test extracted from ccurls.t1.
10+
---
11+
112
https://opensource.org/licenses/liliq-p-1.1

src/licensedcode/data/inactive/rules/free-unknown_url_glc_91.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
---
2+
license_expression: free-unknown
3+
relevance: 100
4+
notes: |
5+
License test derived from a file of the BSD-licensed repository at:
6+
https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/ccurls.t1
7+
originally expected to be detected as LiLiQ-R-1.1
8+
with coverage of 0
9+
This is a URL test extracted from ccurls.t1.
10+
---
11+
112
http://opensource.org/licenses/liliq-r-1.1

src/licensedcode/data/inactive/rules/free-unknown_url_glc_92.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)