Skip to content

Commit e1ad0f3

Browse files
authored
Merge pull request #1851 from AyanSinhaMahapatra/add-doc-link-to-readme
Add documentation links and update install related guides
2 parents d092ead + 1f82690 commit e1ad0f3

11 files changed

Lines changed: 438 additions & 189 deletions

File tree

CONTRIBUTING.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ For other questions, discussions, and chats, we have:
5656

5757
- a mailing list at `sourceforge <https://lists.sourceforge.net/lists/listinfo/aboutcode-discuss>`_
5858

59+
- a Gitter channel to discuss Documentation at https://gitter.im/aboutcode-org/gsod-season-of-docs
5960

6061
Bug reports
6162
===========
@@ -77,10 +78,16 @@ When `reporting a bug`__ please include:
7778
Documentation improvements
7879
==========================
7980

80-
Documentation can come in the form of wiki pages, docstrings, blog posts,
81-
articles, etc. Even a minor typo fix is welcomed.
82-
See also extra documentation on the `Wiki <https://github.com/nexB/scancode-toolkit/wiki>`_.
81+
Documentation can come in the form of new documentation pages/sections, tutorials/how-to documents,
82+
any other general upgrades, etc. Even a minor typo fix is welcomed.
8383

84+
If something is missing in the documentation or if you found some part confusing,
85+
please file an issue with your suggestions for improvement. Use the “Documentation Improvement”
86+
template. Your help and contributions makes ScanCode docs better, we love hearing from you!
87+
88+
The ScanCode documentation is hosted at `scancode-toolkit.readthedocs.io <https://scancode-toolkit.readthedocs.io/en/latest/>`_.
89+
90+
If you want to contribute to Scancode Dcoumentation, you'll find `this guide here <https://scancode-toolkit.readthedocs.io/en/latest/contribute/contrib_doc.html>`_ helpful.
8491

8592
Development
8693
===========

INSTALL.rst

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
============
2+
Installation
3+
============
4+
5+
There are 3 main ways you can `install ScanCode <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html>`_.
6+
7+
- Installation as an Application: Downloading Releases (Recommended)
8+
- Installation as a library: via pip
9+
- Installation from Source Code: Git Clone
10+
11+
Prerequisites
12+
-------------
13+
14+
Before installing ScanCode make sure you've installed the prerequisites properly. This mainly
15+
refers to installing the required Python interpreter (Python 3.6 is recommended).
16+
17+
- For Linux(Ubuntu): ``sudo apt install python3.6-dev bzip2 xz-utils zlib1g libxml2-dev libxslt1-dev``
18+
- For MacOS: Install Python 3.6.8 from https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.6.pkg
19+
- For Windows: Install Python 3.6.8 from https://www.python.org/ftp/python/3.6.8/python-3.6.8.exe
20+
21+
Refer `Prerequisites <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#prerequisites>`_ for detailed information on all different platforms and Python Versions.
22+
23+
Installation as an Application : Downloading Releases
24+
-----------------------------------------------------
25+
26+
#. Download and extract the latest ScanCode release from https://github.com/nexB/scancode-toolkit/releases/
27+
28+
#. Open a terminal window and then `cd` to the extracted ScanCode directory.
29+
30+
#. Run this command to self-configure and display the help-text.
31+
32+
- Linux/Mac : ``./scancode --help``
33+
- Windows : ``scancode --help``
34+
35+
Installation as a library: via pip
36+
----------------------------------
37+
38+
#. Create a Python 3.6 Virtual Environment and activate the same::
39+
40+
virtualenv -p /usr/bin/python3.6 venv-scancode && source venv-scancode/bin/activate
41+
42+
#. Run ``pip install scancode-toolkit``
43+
44+
Installation from Source Code: Git Clone
45+
----------------------------------------
46+
47+
#. Download the Source Code or Use Git Clone::
48+
49+
git clone https://github.com/nexB/scancode-toolkit.git
50+
cd scancode-toolkit
51+
52+
#. You can jump to any checkpoint/Branch/Commit using the following command::
53+
54+
git checkout master
55+
56+
#. Run the Configure Script
57+
58+
- On Linux/Mac: ``./configure``
59+
- On Windows: ``configure``
60+
61+
62+
Note the `Commands will vary <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#commands-variation>`_ across different Installation methods and Platforms.
63+
64+
If this displays the `Help Text <https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/help-text-options.html#help-text>`_, you are all set to start using ScanCode.

README.rst

Lines changed: 52 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
================
22
ScanCode toolkit
33
================
4+
45
A typical software project often reuses hundreds of third-party packages.
56
License and origin information is not always easy to find and not normalized:
67
ScanCode discovers and normalizes this data for you.
78

9+
Read more about ScanCode here: `scancode-toolkit.readthedocs.io <https://scancode-toolkit.readthedocs.io/en/latest/>`_.
10+
811
Why use ScanCode?
9-
=======================
12+
=================
1013

1114
- As a **standalone command line tool**, ScanCode is **easy to install**, run
1215
and embed in your CI/CD processing pipeline. It runs on **Windows, macOS and Linux**.
@@ -37,8 +40,9 @@ Why use ScanCode?
3740

3841
- ScanCode is heavily **tested** with an automated test suite of over **8000 tests**.
3942

40-
See our roadmap for upcoming features:
41-
https://github.com/nexB/scancode-toolkit/wiki/Roadmap
43+
- ScanCode has extensive and updated Documentation help for users.
44+
45+
See our `roadmap <https://scancode-toolkit.readthedocs.io/en/latest/contribute/roadmap.html>`_ for upcoming features.
4246

4347
Build and tests status
4448
======================
@@ -51,72 +55,71 @@ Build and tests status
5155
|Develop| |devel-cov| | |devel-posix| | |devel-win| |
5256
+-------+--------------+-----------------+--------------+
5357

58+
Documentation Build
59+
-------------------
5460

55-
Quick Start
56-
===========
61+
+--------+--------------+
62+
|Version | **RTD Build**|
63+
+========+==============+
64+
| Latest | |docs-rtd| |
65+
+--------+--------------+
5766

58-
Install Python 2.7 then download and extract the latest ScanCode release from
59-
https://github.com/nexB/scancode-toolkit/releases/
6067

61-
Then run ``./scancode -h`` for help.
68+
Documentation
69+
=============
6270

71+
The ScanCode documentation is hosted at `scancode-toolkit.readthedocs.io <https://scancode-toolkit.readthedocs.io/en/latest/>`_.
6372

64-
Installation
65-
============
73+
If you are new to Scancode, start `here <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/newcomer.html>`_.
6674

67-
Pre-requisites:
75+
Other Important Documentation Pages:
6876

69-
* On Windows, please follow the `Comprehensive Installation instructions
70-
<https://github.com/nexB/scancode-toolkit/wiki/Comprehensive-Installation>`_.
71-
Make sure you use Python 2.7 32 bits from
72-
https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi
77+
- A `Synopsis <https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/synopsis.html>`_ of ScanCode Command Line Options
78+
- Tutorials on `How to Run a Scan <https://scancode-toolkit.readthedocs.io/en/latest/tutorials/how_to_run_a_scan.html>`_ and `How to Visualize Scan results <https://scancode-toolkit.readthedocs.io/en/latest/tutorials/how_to_visualize_scan_results.html>`_
79+
- An exhaustive List of `All Available Options <https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/list-options.html>`_
80+
- Documentation on `Contributing to Code Development <https://scancode-toolkit.readthedocs.io/en/latest/contribute/contrib_dev.html>`_
81+
- Documentation on `Plugin Architecture <https://scancode-toolkit.readthedocs.io/en/latest/plugins/plugin_arch.html>`_
82+
- `FAQ <https://scancode-toolkit.readthedocs.io/en/latest/misc/faq.html>`_
7383

74-
* On macOS, install Python 2.7 from
75-
https://www.python.org/ftp/python/2.7.15/python-2.7.15-macosx10.6.pkg
76-
77-
Next, download and extract the latest ScanCode release from
78-
https://github.com/nexB/scancode-toolkit/releases/
79-
80-
* On Linux install the Python 2.7 "devel" and these packages using your
81-
distribution package manager:
82-
83-
* On Ubuntu 14, 16 and 18 use:
84-
``sudo apt-get install python-dev xz-utils zlib1g libxml2-dev libxslt1-dev bzip2``
85-
86-
* On Debian and Debian-based distros use:
87-
``sudo apt-get install python-dev xz-utils zlib1g libxml2-dev libxslt1-dev libbz2-1.0``
88-
89-
* On RPM distros use:
90-
``sudo yum install python-devel xz-libs zlib libxml2-devel libxslt-devel bzip2-libs``
84+
See also https://aboutcode.org for related companion projects and tools.
9185

92-
* On Fedora 22 and later use:
93-
``sudo dnf install python-devel xz-libs zlib libxml2-devel libxslt-devel bzip2-libs``
9486

95-
* See also the `Comprehensive Installation instructions
96-
<https://github.com/nexB/scancode-toolkit/wiki/Comprehensive-Installation>`_
97-
for additional instructions.
87+
Installation
88+
============
9889

90+
Before installing ScanCode make sure you've installed the prerequisites properly. This mainly
91+
refers to installing the required Python interpreter (Python 3.6 is recommended). Refer
92+
`Prerequisites <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#prerequisites>`_ for detailed information on all different platforms and Python Versions.
9993

100-
Next, download and extract the latest ScanCode release from
101-
https://github.com/nexB/scancode-toolkit/releases/
94+
There are 3 main ways you can `install ScanCode <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html>`_.
10295

96+
- `Installation as an Application: Downloading Releases <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#installation-as-an-application-downloading-releases>`_ *(Recommended)*
97+
- `Installation from Source Code: Git Clone <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#installation-from-source-code-git-clone>`_
98+
- `Installation as a library: via pip <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#pip-install>`_
10399

104-
Open a terminal window and then `cd` to the extracted ScanCode directory and run
105-
this command to display help. ScanCode will self-configure if needed::
100+
Quick Start
101+
===========
106102

107-
./scancode --help
103+
Note the `Commands Variation <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#commands-variation>`_ across Installation methods and Platforms.
108104

109105
You can run an example scan printed on screen as JSON::
110106

111107
./scancode -clip --json-pp - samples
112108

109+
Follow the `How to Run a Scan <https://scancode-toolkit.readthedocs.io/en/latest/tutorials/how_to_run_a_scan.html>`_ Tutorial
110+
to perform a basic scan on the ``samples`` directory distributed by default with Scancode.
111+
113112
See more command examples::
114113

115114
./scancode --examples
116115

116+
Refer `How to set what will be detected in Scan <https://scancode-toolkit.readthedocs.io/en/latest/tutorials/how_to_set_what_will_be_detected_in_a_scan.html>`_
117+
and `How to specify Scancode Output Format <https://scancode-toolkit.readthedocs.io/en/latest/tutorials/how_to_format_scan_output.html>`_ for more information.
118+
119+
You can also refer to `Command Line Options Synopsis <https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/synopsis.html>`_ and an exhaustive List of `All Available Options <https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/list-options.html>`_.
117120

118121
Archive extraction
119-
===================
122+
==================
120123

121124
The archives that exist in a codebase must be extracted before running a scan:
122125
ScanCode does not extract files from tarballs, zip files, etc. as part of the
@@ -126,14 +129,7 @@ the mytar.tar.bz2-extract directory::
126129

127130
./extractcode mytar.tar.bz2
128131

129-
130-
Documentation & FAQ
131-
===================
132-
133-
https://github.com/nexB/scancode-toolkit/wiki
134-
135-
See also https://aboutcode.org for related companion projects and tools.
136-
132+
Refer `All Extractcode Options <https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/list-options.html#all-extractcode-options>`_ and `How To Extract Archives <https://scancode-toolkit.readthedocs.io/en/latest/tutorials/how_to_extract_archives.html>`_ for more information.
137133

138134
Support
139135
=======
@@ -151,6 +147,7 @@ For discussions and chats, we have:
151147
You can use your favorite IRC client or use the web chat at
152148
https://webchat.freenode.net/
153149

150+
* a Gitter channel to discuss Documentation at https://gitter.im/aboutcode-org/gsod-season-of-docs
154151

155152
Source code and downloads
156153
=========================
@@ -192,3 +189,7 @@ the third-party code used in ScanCode for more details.
192189
.. |devel-win| image:: https://ci.appveyor.com/api/projects/status/4webymu0l2ip8utr/branch/develop?png=true
193190
:target: https://ci.appveyor.com/project/nexB/scancode-toolkit
194191
:alt: Windows Develop branch tests status
192+
193+
.. |docs-rtd| image:: https://readthedocs.org/projects/scancode-toolkit/badge/?version=latest
194+
:target: https://scancode-toolkit.readthedocs.io/en/latest/?badge=latest
195+
:alt: Documentation Status

docs/source/cli-reference/synopsis.rst

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,30 @@ Toolkit Command Line Interface in the following sections:
1818
Installation
1919
------------
2020

21-
Scancode-Toolkit installation can be installed from ``pip``, the default Python Package Manager.
22-
However, there are more ways to perform an installation, and refer the following sections for
21+
Scancode-Toolkit installation can be done by downloading ScanCode as an application, which
22+
is recommended generally. For users who wish to use ScanCode as a library, it can be
23+
installed via ``pip``, the default Python Package Manager. Refer the following sections for
2324
detailed Instructions on the each of the Installation Methods.
2425

26+
- :ref:`app_install`
2527
- :ref:`pip_install`
26-
- :ref:`latest_release_download_install`
27-
- :ref:`source_configure_install`
28+
- :ref:`source_code_install`
2829

2930
.. _synopsis_quickstart:
3031

3132
Quickstart
3233
----------
3334

34-
The basic command to perform a scan, if Scancode is installed from ``pip``::
35+
The basic command to perform a scan, in case of a download and configure installation
36+
(on Linux/MacOS) is::
3537

36-
scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <SCAN INPUT>
38+
path/to/scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <SCAN INPUT>
3739

38-
The basic usage in case of a download and configure installation (on Linux/MacOS) is::
40+
The basic usage, if Scancode is installed from ``pip``, or in Windows::
3941

40-
path/to/scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <SCAN INPUT>
42+
scancode [OPTIONS] <OUTPUT FORMAT OPTION(s)> <SCAN INPUT>
4143

42-
.. include:: /rst_snippets/tip_snippets/synopsis_quickstart.rst
44+
.. include:: /rst_snippets/note_snippets/synopsis_install_quickstart.rst
4345

4446
Here Scancode scans the <SCAN INPUT> file or directory for license, origin and packages and saves
4547
results to FILE(s) using one or more output format option. Error and progress are printed to
@@ -64,10 +66,12 @@ While a scan using absolute paths from the file system root will look like::
6466
home/ayansm/software/scancode-toolkit-3.1.1/scancode -clpieu --json-pp home/ayansm/scan_scan_results/output.json home/ayansm/codebases/samples/
6567

6668
Commands similar to ``scancode --clpi --json-pp output.json samples`` will be used as examples
67-
throughout the documentation. Here we are inside the ``virtualenv`` where Scancode-Toolkit was
68-
installed by ``pip``, and the default ``samples`` folder is being scanned, which is distributed
69-
by default with Scancode-Toolkit.
69+
throughout the documentation.
70+
71+
- Here we are inside the ``virtualenv`` where Scancode-Toolkit is configured.
7072

73+
- And the default ``samples`` folder is being scanned, which is distributed by default with
74+
Scancode-Toolkit.
7175

7276
.. _scancode_cli_options:
7377

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
# This points to aboutcode.readthedocs.io
3535
# In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
3636
# Link was created at commit - https://github.com/nexB/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83
37+
3738
intersphinx_mapping = {'aboutcode': ('https://aboutcode.readthedocs.io/en/latest/', None),
3839
'scancode-workbench': ('https://scancode-workbench.readthedocs.io/en/develop/', None)}
3940

0 commit comments

Comments
 (0)