Usage
=====

.. _generate_report:

Generate report
---------------

This command consumes the ARF file, which is one of the possible standardized formats for
the results of SCAP-compliant scanners.The ARF reports that are supported and tested are
primarily those generated by OpenSCAP scanner.You can read about generating ARF report files
using OpenSCAP in the OpenSCAP User Manual. Or you can use test ARF files
from repository `/tests/test_data`.

.. code-block:: console

    oscap-report ssg-fedora-ds-arf.xml > report.html

More information about command line usage in :ref:`man page` man page.

Run from source
---------------

Requirements:

* Python 3.8+
* `lxml`_
* `jinja2`_

.. code-block:: console

    # Get repository with code
    git clone https://github.com/OpenSCAP/openscap-report.git
    cd openscap-report

    # Install required packages
    sudo pip3 install -r requirements.txt

    # Run alternative command for oscap-report ssg-fedora-ds-arf.xml > report.html
    python3 -m openscap_report.cli ssg-fedora-ds-arf.xml > report.html

    # Run alternative command for oscap-report -h
    python3 -m openscap_report.cli -h

.. _jinja2 : https://jinja.palletsprojects.com/en/3.1.x/
.. _lxml : https://lxml.de/