Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adjust syntax hilight for code blocks #592

Merged
merged 1 commit into from
Sep 25, 2023
Merged
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
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Installation

Install from pypi.org as you would any other Python module using your preferred package manager:

.. code-block:: bash
.. code-block:: sh
pip install cyclonedx-bom
24 changes: 12 additions & 12 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Command Line Usage

Once installed, you can call the tool via the following methods:

.. code-block:: bash
.. code-block:: shell-session

$ python3 -m cyclonedx_py
$ cyclonedx-py
$ cyclonedx-bom # deprecated

The full documentation can be issued by running with ``--help``:

.. code-block:: bash
.. code-block:: shell-session

$ cyclonedx-py --help
usage: cyclonedx-py [-h] (-c | -cj | -e | -p | -pip | -r) [-i FILE_PATH]
Expand Down Expand Up @@ -77,7 +77,7 @@ included in the generated CycloneDX BOM.

Simply run:

.. code-block:: bash
.. code-block:: sh

cyclonedx-py -e -o -

Expand All @@ -102,7 +102,7 @@ We support parsing output from Conda in various formats:

As example:

.. code-block:: bash
.. code-block:: sh

conda list --explicit --md5 | cyclonedx-py -c -o cyclonedx.xml

Expand All @@ -113,14 +113,14 @@ exact pinned versions.

You can then run ``cyclonedx-py`` as follows:

.. code-block:: bash
.. code-block:: sh

cyclonedx-py -p -i PATH/TO/poetry.lock -o sbom.xml


If your ``poetry.lock`` is in the current working directory, you can also shorten this to:

.. code-block:: bash
.. code-block:: sh

cyclonedx-py -p -o sbom.xml

Expand All @@ -130,14 +130,14 @@ We currently support ``Pipfile.lock`` manifest files.

You can then run ``cyclonedx-bom`` as follows:

.. code-block:: bash
.. code-block:: sh

cyclonedx-py -pip -i PATH/TO/Pipfile.lock -o sbom.xml


If your ``Pipfile.lock`` is in the current working directory, you can also shorten this to:

.. code-block:: bash
.. code-block:: sh

cyclonedx-pu -pip -o sbom.xml

Expand All @@ -147,20 +147,20 @@ If your ``Pipfile.lock`` is in the current working directory, you can also short
We support ``requirements.txt`` manifest files. Note that a SBOM such as CycloneDX expects exact version numbers,
therefore if you wish to generate a BOM from a ``requirements.txt``, these must be frozen. This can be accomplished via:

.. code-block:: bash
.. code-block:: sh

pip freeze > requirements.txt


You can then run ``cyclonedx-bom`` as follows:

.. code-block:: bash
.. code-block:: sh

cyclonedx-py -r -i PATH/TO/requirements.txt -o sbom.xml

If your ``requirements.txt`` is in the current working directory, you can also shorten this to:

.. code-block:: bash
.. code-block:: sh

cyclonedx-py -r -o sbom.xml

Expand Down Expand Up @@ -234,7 +234,7 @@ CycloneDX bill of materials (according to schema).
If you need to use a ``requirements.txt`` in your project that does not have pinned versions an acceptable workaround
might be to:

.. code-block:: bash
.. code-block:: sh

pip install -r requirements.txt
pip freeze > requirements-frozen.txt
Expand Down