swh.scanner.output module#
- class swh.scanner.output.Color(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum
- BLUE = '\x1b[94m'#
- GREEN = '\x1b[92m'#
- RED = '\x1b[91m'#
- END = '\x1b[0m'#
- swh.scanner.output.get_output_class(mode='text')[source]#
return the output class that correspond to mode
- class swh.scanner.output.BaseOutput(root_path: str, nodes_data: MerkleNodeInfo, source_tree: Directory)[source]#
Bases:
ABC
base class for object able to display scan result
- class swh.scanner.output.SummaryOuput(root_path: str, nodes_data: MerkleNodeInfo, source_tree: Directory)[source]#
Bases:
BaseOutput
display a summary of the scan results
- class swh.scanner.output.TextOuput(root_path: str, nodes_data: MerkleNodeInfo, source_tree: Directory)[source]#
Bases:
BaseOutput
display an exhaustive result of the scan in text form
note: as soon as the scan target something larger than a toy project, the usability of this mode is poor.
- class swh.scanner.output.JsonOuput(root_path: str, nodes_data: MerkleNodeInfo, source_tree: Directory)[source]#
Bases:
BaseOutput
display the scan result in json
- class swh.scanner.output.NDJsonTextOuput(root_path: str, nodes_data: MerkleNodeInfo, source_tree: Directory)[source]#
Bases:
JsonOuput
display the scan result in newline-delimited json
- class swh.scanner.output.SunburstOuput(root_path: str, nodes_data: MerkleNodeInfo, source_tree: Directory)[source]#
Bases:
BaseOutput
display the scan result as a sunburst plot
note: as soon as the scan target something larger than a toy project, the usability of this mode is poor.
- class swh.scanner.output.InteractiveSunburstOuput(root_path: str, nodes_data: MerkleNodeInfo, source_tree: Directory)[source]#
Bases:
SunburstOuput
display the scan result as an interactive sunburst plot