diff --git a/docs/source/index.rst b/docs/source/index.rst index 5ce4aed8..142c0ea4 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -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 =================== diff --git a/docs/source/scancode-toolkit/how-to/discover_licenses.rst b/docs/source/scancode-toolkit/how-to/discover_licenses.rst new file mode 100644 index 00000000..57ed0384 --- /dev/null +++ b/docs/source/scancode-toolkit/how-to/discover_licenses.rst @@ -0,0 +1,48 @@ +Recommended scancode-toolkit options to discover licenses +========================================================= + +.. code-block:: bash + + ./scancode [OPTIONS] + + +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 + + diff --git a/docs/source/scancode-toolkit/how-to/how_to_take_advantage_of_license_policy_support.rst b/docs/source/scancode-toolkit/how-to/how_to_take_advantage_of_license_policy_support.rst new file mode 100644 index 00000000..3eee4600 --- /dev/null +++ b/docs/source/scancode-toolkit/how-to/how_to_take_advantage_of_license_policy_support.rst @@ -0,0 +1,13 @@ +How to take advantage of license policy support +=============================================== + +.. attention:: + Learn about `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