Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ How-To Documents

How-To documents explain how to accomplish specific tasks.

.. warning:: How-to articles in this sections are being to be documented. Refrain from using it.

.. toctree::
:maxdepth: 1

scancode-toolkit/how-to/discover_licenses
scancode-toolkit/how-to/how_to_take_advantage_of_license_policy_support

Reference Documents
===================
Expand Down
48 changes: 48 additions & 0 deletions docs/source/scancode-toolkit/how-to/discover_licenses.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Recommended scancode-toolkit options to discover licenses
=========================================================

.. code-block:: bash

./scancode [OPTIONS] <input> <OUTPUT FORMAT OPTION(s)>


How to generate licenses
------------------------

.. code-block:: bash

./scancode --license samples/zlib --html scancode_result.html

Include diagnostic information in license scan results.
-------------------------------------------------------

.. code-block:: bash

./scancode --license --license-diag samples/zlib --html scancode_result.html

How to set license score threshold
----------------------------------

Do not return license matches with a score lower than this score. A number between 0 and 100. [default: 0]

.. code-block:: bash

./scancode --license --license-score INTEGER --license-diag samples/zlib --html scancode_result.html

How to include the detected licenses matched text.
--------------------------------------------------

.. code-block:: bash

./scancode --license --license-text samples/zlib --html scancode_result.html

How to set template URL for license references
----------------------------------------------

Set the template URL used for the license reference URLs. Curly braces ({}) are replaced by the license key. [default: https://enterprise.dejacode.com/urn/urn:dje:license:{}]

.. code-block:: bash

./scancode --license --license-url-template https://enterprise.dejacode.com/urn/urn:dje:license:zlib samples/zlib --html scancode_result.html


Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
How to take advantage of license policy support
===============================================

.. attention::
Learn about `license policy plugin <https://github.com/nexB/scancode-toolkit/wiki/License-Policy-Plugin>`__ before reading the following article

This plugin allows the user to apply policy details to a scancode scan, depending on which licenses are detected in a particular file. If a license specified in the Policy file is detected by scancode, this plugin will apply that policy information to the Resource as a new attribute:

Load a License Policy file and apply it to the scan at the Resource level.

.. code-block:: bash

./scancode --license --license-policy policy-file.yml samples/zlib --html scancode_result.html