Skip to content

Commit 166b616

Browse files
Fix documentation issues (#4457)
* Fixed #4434 - Changed "Scancode" to "ScanCode" * Fixed #4446 - Corrected non-clickable link * Fixed #4444 - Remove the duplicated installation content * Fixed #4445 - Added reference links to the TOC and the Scan Output Options page within the 'Output Formats' section. * Fixed #4443 - Added wording to clarify the differences between `--json` and `--json-pp` * Fixed #4440 - Added reference for "Git" under the "Installation via Docker" section * Update "ScanCode Toolkit" to "ScanCode-Toolkit" * Corrected typo * Fixed #4437 - Remove the needed for virtualenv * Fixed #2485 - Fixed the format in the integration section. * Correct CI Documentation check * Fixed #1330 - Update doc to reference `--license-text` is not compatiable with `--csv` output * Restore install references to synopsis Signed-off-by: Chin Yeung Li <tli@nexb.com> Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com> Co-authored-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent d1476eb commit 166b616

15 files changed

+66
-46
lines changed

docs/source/cli-reference/basic-options.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,12 @@
538538

539539
The option ``--license-text-diagnostics`` is a sub-option of ``--license-text``.
540540

541+
.. admonition:: Attention
542+
543+
The option ``--license-text`` will not work with the ``--csv``
544+
output as outputting full license texts in a CSV file doesn't serve
545+
a practical purpose.
546+
541547
With the ``--license-text`` option, the scan results attribute "matched text" includes the matched text
542548
for the detected license.
543549

docs/source/cli-reference/output-format.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ following options.
199199
"scan_errors": []
200200
},
201201

202-
This is the recommended Output option for ScanCode Toolkit.
202+
This is the recommended Output option for ScanCode-Toolkit.
203203

204204
----
205205

docs/source/cli-reference/scan-options-post.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ To see all plugins available via command line help, use ``--plugins``.
5353
.. note::
5454

5555
The ``--consolidate`` option will be deprecated in a future version of
56-
ScanCode Toolkit as top level packages, dependencies and licenses
56+
ScanCode-Toolkit as top level packages, dependencies and licenses
5757
now provide improved consolidated data.
5858

5959
The JSON file containing scan results after using the ``--consolidate`` Plugin is structured as

docs/source/cli-reference/synopsis.rst

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ ScanCode detects licenses, copyrights, package manifests and direct dependencies
77
in source code and binary files, by scanning the files. This page introduces you to the ScanCode
88
Toolkit Command Line Interface in the following sections:
99

10-
- Installation
11-
- Quickstart
12-
- Type of Options
13-
- Output Formats
14-
- Other Important Documentation
10+
- :ref:`syn_install`
11+
- :ref:`synopsis_quickstart`
12+
- :ref:`scancode_cli_options`
13+
- :ref:`synopsis_output`
14+
- :ref:`other_imp_doc`
1515

1616
.. _syn_install:
1717

@@ -26,7 +26,8 @@ detailed Instructions on the each of the Installation Methods.
2626
- :ref:`app_install`
2727
- :ref:`pip_install`
2828
- :ref:`source_code_install`
29-
29+
- :ref:`docker_install`
30+
- :ref:`fedora_install`
3031

3132
.. _synopsis_quickstart:
3233

@@ -77,7 +78,7 @@ throughout the documentation.
7778
Type of Options
7879
---------------
7980

80-
ScanCode Toolkit Command Line options can be divided into these major sections:
81+
ScanCode-Toolkit Command Line options can be divided into these major sections:
8182

8283
- :ref:`cli_basic`
8384
- :ref:`Extractcode Options <cli_extract>`
@@ -94,18 +95,27 @@ Line Options listed under each section.
9495
Output Formats
9596
--------------
9697

97-
The output file format is set by using the various output options. The recommended output format
98-
is JSON. If ``--json`` is used, the entire file being in one line, without whitespace characters.
98+
The output file format is set by using the various output options. See
99+
:doc:`../rst_snippets/output_format_options` . The recommended output
100+
format is JSON.
101+
102+
If ``--json`` is used, the entire file being in one line, without
103+
whitespace characters. If ``--json-pp`` is used, the output is in a
104+
pretty-printed JSON format—structured with indentation and line breaks to
105+
make it more human-readable, rather than compressed into a single line.
106+
107+
The following example scans will show you how to run a scan with each of
108+
the result formats. For the scans, we will use the ``samples`` directory
109+
provided with the ScanCode-Toolkit, along with the ``--json-pp`` output
110+
option.
99111

100-
The following example scans will show you how to run a scan with each of the result formats. For
101-
the scans, we will use the ``samples`` directory provided with the ScanCode Toolkit.
102112

103113
.. include:: /rst_snippets/tip_snippets/stdout.rst
104114

105115
JSON file output
106116
^^^^^^^^^^^^^^^^
107117

108-
Scan the ``samples`` directory and save the scan to a JSON file (pretty-printed):::
118+
Scan the ``samples`` directory and save the scan to a JSON file (pretty-printed)::
109119

110120
scancode -clpieu --json-pp output.json samples
111121

@@ -301,4 +311,6 @@ file. When the scan is done, open ``samples.html`` in your web browser.
301311
.. image:: data/scancode-toolkit-static-html1.png
302312
.. image:: data/scancode-toolkit-static-html2.png
303313

314+
.. _other_imp_doc:
315+
304316
.. include:: /rst_snippets/other_imp_doc.rst

docs/source/getting-started/home.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ most advanced open source and commercial tools available today for Software
4141
Composition Analysis.
4242

4343

44-
What does ScanCode Toolkit do?
44+
What does ScanCode-Toolkit do?
4545
------------------------------
4646

4747
ScanCode detects and normalizes origin, dependencies, licensing and other

docs/source/getting-started/install.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ ScanCode needs a Python 3.9+ interpreter; We support all Python versions from
125125
Installation as an Application: Downloading Releases
126126
-----------------------------------------------------
127127

128-
Get the ScanCode Toolkit tarball archive of a specific version and your
128+
Get the ScanCode-Toolkit tarball archive of a specific version and your
129129
operating system by going to the `project releases page <https://github.com/aboutcode-org/scancode-toolkit/releases/>`_
130130

131131
For example, Version 30.0.1 archive can be obtained from
@@ -267,15 +267,16 @@ Un-installation
267267
Installation via Docker:
268268
------------------------
269269

270-
You can install ScanCode Toolkit by building a Docker image from the included Dockerfile.
270+
You can install ScanCode-Toolkit by building a Docker image from the included Dockerfile.
271271
The prerequisite is a working `docker installation <https://docs.docker.com/engine/install/>`_.
272272

273273

274274
Download the ScanCode-Toolkit Source Code
275275
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
276276

277-
- ``git clone https://github.com/aboutcode-org/scancode-toolkit`` to get the latest
278-
( :ref:`source_code_install` ) source code.
277+
Run the following once you have `Git <https://git-scm.com/>`_ installed::
278+
279+
git clone https://github.com/aboutcode-org/scancode-toolkit.git
279280

280281

281282
Build the Docker image
@@ -328,7 +329,7 @@ those after will be forwarded to scancode.
328329
Installation from Source Code: Git Clone
329330
-----------------------------------------
330331

331-
You can download the ScanCode Toolkit Source Code and build from it yourself.
332+
You can download the ScanCode-Toolkit Source Code and build from it yourself.
332333
This is what you would want to do it if:
333334

334335
- You are developing ScanCode or adding new patches or want to run tests.

docs/source/getting-started/newcomer.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ Table of Contents
3838

3939
.. _newcomer_try_scancode:
4040

41-
Try ScanCode Toolkit
41+
Try ScanCode-Toolkit
4242
--------------------
4343

44-
This section is about using the ScanCode Toolkit, i.e. Performing a scan on a codebase/files to
44+
This section is about using the ScanCode-Toolkit, i.e. Performing a scan on a codebase/files to
4545
determine their license, copyrights and other information, according to your requirements.
4646

4747
#. The :ref:`newcomer_scan_codebase` section helps you with configuring your virtual environment,
@@ -58,13 +58,14 @@ determine their license, copyrights and other information, according to your req
5858
Before you start using ScanCode
5959
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6060

61-
#. You need to make sure :ref:`install_prerequisites` are installed, and a `virtualenv <https://docs.python-guide.org/dev/virtualenvs/>`_
62-
is created. There are a few different ways to install ScanCode:
61+
#. You need to make sure :ref:`install_prerequisites` are installed. There
62+
are a few different ways to install ScanCode:
6363

6464
- :ref:`app_install` [Recommended for newcomers]
6565
- :ref:`docker_install`
6666
- :ref:`pip_install`
6767
- :ref:`source_code_install`
68+
- :ref:`fedora_install`
6869

6970

7071
#. Run ``scancode -h`` to make sure ScanCode was installed properly.
@@ -90,7 +91,7 @@ Once you are all set up with ScanCode-Toolkit, i.e. Running ``scancode -h`` show
9091
#. Refer :ref:`synopsis_quickstart` for commonly used scan commands, and commonly used
9192
:ref:`synopsis_output`. (The recommended output format is ``JSON``)
9293

93-
#. Refer `this section <file:///home/ayansm/Desktop/GSoD/main_repo/aboutcode/docs/build/html/scancode-toolkit/cli-reference/list-options.html#all-extractcode-options>`_ for Extractcode Options.
94+
#. Refer :doc:`../rst_snippets/extract` for the use of ExtractCode.
9495

9596
#. :ref:`how_to_run_a_scan` is a sample tutorial for absolute beginners, to walk them through the
9697
process of running a scan. Follow this tutorial and perform a scan on the ``sample`` folder
@@ -142,7 +143,7 @@ ScanCode Versions
142143

143144
.. _newcomer_learn_scancode:
144145

145-
Learn more about ScanCode Toolkit
146+
Learn more about ScanCode-Toolkit
146147
---------------------------------
147148

148149
Here we give an introduction on the ScanCode-Toolkit Documentation Sections that can help you to
@@ -153,7 +154,7 @@ learn more about ScanCode-Toolkit.
153154
CLI Reference
154155
^^^^^^^^^^^^^
155156

156-
This section contains a complete guide to ScanCode Toolkit Command Line options, i.e. What the
157+
This section contains a complete guide to ScanCode-Toolkit Command Line options, i.e. What the
157158
command-line options are, how different options affect the scan and outputs, how to use these
158159
options and examples of their use cases.
159160

@@ -179,7 +180,7 @@ This section has documentation on :ref:`explain_how_scancode_works`.
179180
Plugins
180181
^^^^^^^
181182

182-
Plugins are an integral part of ScanCode Toolkit in the sense they are used to easily extend
183+
Plugins are an integral part of ScanCode-Toolkit in the sense they are used to easily extend
183184
ScanCode capabilities, and developers can code their own plugins according to their requirements.
184185

185186
This section has documentation on:
@@ -215,7 +216,7 @@ If you haven't contributed to ScanCode-Toolkit refer :ref:`newcomer_good_first_i
215216

216217
To determine where to contribute, you can refer:
217218

218-
#. ScanCode Toolkit tracks issues via the `GitHub Issue tracker <https://github.com/aboutcode-org/scancode-toolkit/issues>`_
219+
#. ScanCode-Toolkit tracks issues via the `GitHub Issue tracker <https://github.com/aboutcode-org/scancode-toolkit/issues>`_
219220
#. Broad `milestones <https://github.com/aboutcode-org/scancode-toolkit/milestones>`_ for upcoming versions are also maintained.
220221

221222
And documentation related to contributing code can be referred at :ref:`contrib_code_dev`.
@@ -266,7 +267,7 @@ You can contribute to the following Open Issues on documentation.
266267

267268
#. `First Timers Only Issues List <https://github.com/aboutcode-org/scancode-toolkit/issues/1826>`_
268269
#. `Documentation Inconsistencies Tracker <https://github.com/aboutcode-org/scancode-toolkit/issues/1813>`_
269-
#. `ScanCode Toolkit Documentation Roadmap <https://github.com/aboutcode-org/scancode-toolkit/issues/1824>`_
270+
#. `ScanCode-Toolkit Documentation Roadmap <https://github.com/aboutcode-org/scancode-toolkit/issues/1824>`_
270271
#. `Issues with label Documentation <https://github.com/aboutcode-org/scancode-toolkit/issues?q=is%3Aopen+is%3Aissue+label%3Adocumentation>`_
271272

272273
.. note::

docs/source/how-to-guides/install_new_license_plugin.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Entry points definition in ``setup.py``
4040
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4141

4242
First, in ``setup.py``, you must provide an entry point called ``scancode_location_provider``.
43-
This allows ScanCode Toolkit to discover the plugin and use it in license detection.
43+
This allows ScanCode-Toolkit to discover the plugin and use it in license detection.
4444
Here is the definition of ``entry_points`` in ``setup.py``::
4545

4646
entry_points={
@@ -51,7 +51,7 @@ Here is the definition of ``entry_points`` in ``setup.py``::
5151

5252
The ``scancode_location_provider`` entry point maps to a list with information about the plugin.
5353
The variable ``licenses_to_install1`` is the name of the entry point. All entry point names
54-
**must** start with the prefix ``licenses``, or else ScanCode Toolkit will not use them in
54+
**must** start with the prefix ``licenses``, or else ScanCode-Toolkit will not use them in
5555
license detection.
5656

5757
Directory structure

docs/source/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
ScanCode Toolkit Documentation
1+
ScanCode-Toolkit Documentation
22
==============================
33

4-
Welcome to ScanCode Toolkit Documentation!
4+
Welcome to ScanCode-Toolkit Documentation!
55

6-
If you are new to ScanCode Toolkit, start here:
6+
If you are new to ScanCode-Toolkit, start here:
77

88
.. toctree::
99
:maxdepth: 2
@@ -100,7 +100,7 @@ Reference Documents
100100
--------------------
101101

102102
Reference documents provide reference pages for technical reference information
103-
about ScanCode Toolkit, including how it works and supported features.
103+
about ScanCode-Toolkit, including how it works and supported features.
104104

105105
.. toctree::
106106
:maxdepth: 2

docs/source/misc/faq.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ integration with my system to trigger the license check and to use the result?
5656

5757
In terms of API, there are two stable entry points:
5858

59-
#. The JSON output when you use it as a command line tool from any language or
60-
when you call the scancode.cli.scancode function from a Python script.
59+
- The JSON output when you use it as a command line tool from any language
60+
or when you call the scancode.cli.scancode function from a Python script.
6161

62-
#. Otherwise the scancode.cli.api module provides a simple function if you are
63-
only interested in calling a certain service on a given file (such as license
64-
detection or copyright detection)
62+
- Otherwise the scancode.cli.api module provides a simple function if you
63+
are only interested in calling a certain service on a given file (such as
64+
license detection or copyright detection)
6565

6666

6767
Can I install ScanCode in a Unicode path?

0 commit comments

Comments
 (0)