Skip to content

Commit

Permalink
Add tutorial for symbol and string collection
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Priyadarshi <[email protected]>
  • Loading branch information
keshav-space committed May 2, 2024
1 parent 58a45cc commit 449fd0a
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ you’ll find information on:
tutorial_api_analyze_package_archive
tutorial_license_policies
tutorial_vulnerablecode_integration
tutorial_web_ui_symbol_and_string_collection

.. toctree::
:maxdepth: 2
Expand Down
93 changes: 93 additions & 0 deletions docs/tutorial_web_ui_symbol_and_string_collection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
.. _tutorial_web_ui_symbol_and_string_collection:

Symbol and String Collection (Web UI)
=====================================

In this tutorial we'll introduce the different addon pipeline that can be used for
collecting symbols and strings from codebase resources.

.. note::
This tutorial assumes that you have a working installation of ScanCode.io.
If you don't, please refer to the :ref:`installation` page.

Throughout this tutorial, we will use this resource for symbol and string collection.

.. image:: images/tutorial-web-ui-symbol-and-string-collection-demo-resource.png

Ctags Symbols
-------------

- Open any existing projects containing a few resources.

- Click on the **"Add pipeline"** button and select the **"collect_symbols"**
pipeline from the dropdown list.
Check the **"Execute pipeline now"** option and validate with the **"Add pipeline"**
button.

.. warning::
The ``collect_symbols`` pipeline requires ``universal-ctags``, please refer
to the :ref:`system_dependencies`.

- Once the pipeline run completes with success, you can reach the **Resources** list view
by clicking the count number under the **"RESOURCES"** header:

.. image:: images/tutorial-web-ui-symbol-and-string-collection-resource-link.png

- Click on any code file and go to **Extra** tab, to get the resource symbols.

.. image:: images/tutorial-web-ui-symbol-and-string-collection-result-ctags.png

Xgettext Strings
----------------

- Open any existing projects containing a few resources.

- Click on the **"Add pipeline"** button and select the **"collect_source_strings"**
pipeline from the dropdown list.
Check the **"Execute pipeline now"** option and validate with the **"Add pipeline"**
button.

.. warning::
The ``collect_source_strings`` pipeline requires ``gettext``, please refer
to the :ref:`system_dependencies`.

- Once the pipeline run completes with success, you can reach the **Resources** list view
by clicking the count number under the **"RESOURCES"** header:

- Click on any code file and go to **Extra** tab, to get the resource strings.

.. image:: images/tutorial-web-ui-symbol-and-string-collection-result-xgettext.png

Tree-Sitter Symbols and Strings
-------------------------------

- Open any existing projects containing a few resources.

- Click on the **"Add pipeline"** button and select the **"collect_tree_sitter_symbols"**
pipeline from the dropdown list.
Check the **"Execute pipeline now"** option and validate with the **"Add pipeline"**
button.

- Once the pipeline run completes with success, you can reach the **Resources** list view
by clicking the count number under the **"RESOURCES"** header:

- Click on any code file and go to **Extra** tab, to get the resource symbols and strings.

.. image:: images/tutorial-web-ui-symbol-and-string-collection-result-tree-sitter.png

Pygments Symbols and Strings
-------------------------------

- Open any existing projects containing a few resources.

- Click on the **"Add pipeline"** button and select the **"collect_pygments_symbols"**
pipeline from the dropdown list.
Check the **"Execute pipeline now"** option and validate with the **"Add pipeline"**
button.

- Once the pipeline run completes with success, you can reach the **Resources** list view
by clicking the count number under the **"RESOURCES"** header:

- Click on any code file and go to **Extra** tab, to get the resource symbols and strings.

.. image:: images/tutorial-web-ui-symbol-and-string-collection-result-pygments.png

0 comments on commit 449fd0a

Please sign in to comment.