-
-
Notifications
You must be signed in to change notification settings - Fork 601
Documents for scancode-license-data
#4024
#4461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 3 commits
3fb4520
39a9eed
67f7634
38a89f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,45 @@ Other available CLIs | |
|
||
---- | ||
|
||
.. include:: /rst_snippets/scancode-reindex-licenses.rst | ||
.. include:: /rst_snippets/extract.rst | ||
|
||
---- | ||
|
||
.. include:: /rst_snippets/extract.rst | ||
.. include:: /rst_snippets/scancode-license-data.rst | ||
|
||
|
||
``--path`` Option: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be inside |
||
^^^^^^^^^^^^^^^^^^ | ||
|
||
The ``--path`` option defines the directory where the license data will be stored. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor, but could you add a line that this is a mandatory option |
||
|
||
Here is an example of dumping license data with the ``--path DIR`` option:: | ||
|
||
scancode-license-data --path ~/licenses | ||
|
||
Dumping license data to: /home/user/licenses | ||
Done dumping #2465 licenses. | ||
|
||
Each of the licenses contains four files: '.LICENSE', '.html', '.json', and '.yml'. | ||
|
||
The dumped licenses directory look like this:: | ||
|
||
licenses/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you also explain that this is available online at scancode-licensedb.aboutcode.org/ (generated from https://github.com/aboutcode-org/scancode-licensedb which is refreshed automatically from scancode each day on new commits) and that someone can open this on their browser locally after using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't understand what does this mean? Perhaps I can simply say |
||
├── 389-exception.LICENSE | ||
├── 389-exception.html | ||
├── 389-exception.json | ||
├── 389-exception.yml | ||
├── 3com-microcodeLICENSE | ||
├── 3com-microcode.html | ||
├── 3com-microcode.json | ||
├── 3com-microcode.yml | ||
. | ||
. | ||
. | ||
|
||
---- | ||
|
||
``scancode-reindex-licenses`` command | ||
------------------------------------- | ||
.. include:: /rst_snippets/scancode-reindex-licenses.rst | ||
|
||
ScanCode maintains a license index to search for and detect licenses. When ScanCode is | ||
configured for the first time, a license index is built and used in every scan thereafter. | ||
|
@@ -26,6 +55,38 @@ displays the following message to the terminal:: | |
|
||
This has several CLI options as follows: | ||
|
||
|
||
``--all-languages`` Option: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Rebuild the license index including texts all languages (and not only | ||
English) and exit. This is an EXPERIMENTAL option. | ||
|
||
|
||
``--only-builtin`` Option: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Rebuild the license index excluding any additional license directory or additional | ||
license plugins which were added previously, i.e. with only builtin scancode license and rules. | ||
|
||
This is applicable when there are additional license plugins installed already and you want to | ||
reindex the licenses without these licenses from the additional plugins. | ||
|
||
.. note:: | ||
|
||
Running the ``--only-builtin`` command won't get rid of the installed license plugins, it | ||
would just reindex without the licenses from these plugins for once. Another reindex afterwards | ||
without this option would bring back the licenses from the plugins again in the index. | ||
|
||
|
||
``--load-dump`` Option | ||
^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Load all licenses and rules from their respective files and then dump them | ||
to their respective files. This is done to make small formatting changes across | ||
all licenses and rules, to be consistent across them. | ||
|
||
|
||
``--additional-directory`` Option: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
|
@@ -77,34 +138,3 @@ need to reindex the license index with those directories as parameters:: | |
better reproducibility and distribution of those license/rules | ||
for use in conjunction with scancode-toolkit licenses. | ||
See :ref:`install_new_license_plugin` | ||
|
||
|
||
``--only-builtin`` Option: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Rebuild the license index excluding any additional license directory or additional | ||
license plugins which were added previously, i.e. with only builtin scancode license and rules. | ||
|
||
This is applicable when there are additional license plugins installed already and you want to | ||
reindex the licenses without these licenses from the additional plugins. | ||
|
||
.. note:: | ||
|
||
Running the ``--only-builtin`` command won't get rid of the installed license plugins, it | ||
would just reindex without the licenses from these plugins for once. Another reindex afterwards | ||
without this option would bring back the licenses from the plugins again in the index. | ||
|
||
|
||
``--all-languages`` Option: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Rebuild the license index including texts all languages (and not only | ||
English) and exit. This is an EXPERIMENTAL option. | ||
|
||
|
||
``--load-dump`` Option | ||
^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Load all licenses and rules from their respective files and then dump them | ||
to their respective files. This is done to make small formatting changes across | ||
all licenses and rules, to be consistent across them. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
``scancode-license-data`` Usage | ||
------------------------------- | ||
|
||
Usage: scancode-license-data [OPTIONS] | ||
|
||
Dump scancode license data in various formats, and the licenseDB static | ||
website at `path`. | ||
|
||
Options: | ||
--path DIR Dump the license data in this directory in the LicenseDB format | ||
and exit. Creates the directory if it does not exist. | ||
-h, --help Show this message and exit. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
``scancode-reindex-licenses`` Usage | ||
----------------------------------- | ||
|
||
Usage: ``scancode-reindex-licenses [OPTIONS]`` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't CLI scripts/othe CLI commands best be wrapped by `` so they are highlighted differently? |
||
Usage: scancode-reindex-licenses [OPTIONS] | ||
|
||
Reindex scancode licenses and exit | ||
|
||
Options | ||
------- | ||
Reindex scancode licenses and exit | ||
|
||
Options: | ||
--all-languages [EXPERIMENTAL] Rebuild the license index | ||
including texts all languages (and not only | ||
English) and exit. | ||
--only-builtin Rebuild the license index excluding any | ||
additional license directory or additional | ||
license plugins which were added previously, i.e. | ||
with only builtin scancode license and rules. | ||
license plugins which were added previously, | ||
i.e. with only builtin scancode license and | ||
rules. | ||
--load-dump Load all the license objects from file and then | ||
dump them back to their respective license | ||
files. | ||
--additional-directory DIR Include this directory with additional custom | ||
licenses and license rules in the license | ||
detection index. | ||
--load-dump Load all license and rules from their respective | ||
files and then dump them back to those same files. | ||
-h, --help Shows the options and explanations. | ||
-h, --help Show this message and exit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be inside
scancode-license-data.rst