Skip to content
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
14 changes: 7 additions & 7 deletions cyclonedx_py/_internal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar
default=SchemaVersion.V1_5.to_version())
op.add_argument('--sv', '--spec-version',
metavar='<version>',
help='The CycloneDX spec version for your SBOM'
help='Which version of CycloneDX to use.'
f' {{choices: {", ".join(sorted((v.to_version() for v in SchemaVersion), reverse=True))}}}'
' (default: %(default)s)',
dest='spec_version',
Expand All @@ -94,13 +94,13 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar
default=SchemaVersion.V1_5.to_version())
op.add_argument('--output-reproducible',
help='Whether to go the extra mile and make the output reproducible.\n'
'This might result in loss of time- and random-based-values.',
'This might result in loss of time- and random-based values.',
action='store_true',
dest='output_reproducible',
default=False)
op.add_argument('--of', '--output-format',
metavar='<format>',
help='The output format for your SBOM'
help='Which output format to use.'
f' {choices4enum(OutputFormat)}'
' (default: %(default)s)',
dest='output_format',
Expand All @@ -115,29 +115,29 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar
default=OPTION_OUTPUT_STDOUT)
op.add_argument('-o', '--output-file',
metavar='<file>',
help='Output file path for your SBOM'
help='Path to the output file.'
f' (set to "{OPTION_OUTPUT_STDOUT}" to output to <stdout>)'
' (default: %(default)s)',
type=FileType('wt', encoding='utf8'),
dest='output_file',
default=OPTION_OUTPUT_STDOUT)
if BooleanOptionalAction:
op.add_argument('--validate',
help='Whether validate the result before outputting'
help='Whether to validate resulting BOM before outputting.'
' (default: %(default)s)',
action=BooleanOptionalAction,
dest='should_validate',
default=True)
else:
vg = op.add_mutually_exclusive_group()
vg.add_argument('--validate',
help='Validate the result before outputting'
help='Validate resulting BOM before outputting.'
' (default: %(default)s)',
action='store_true',
dest='should_validate',
default=True)
vg.add_argument('--no-validate',
help='Do not validate the result before outputting',
help='Disable validation of resulting BOM.',
dest='should_validate',
action='store_false')

Expand Down
2 changes: 1 addition & 1 deletion cyclonedx_py/_internal/cli_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def add_argument_mc_type(p: 'ArgumentParser') -> 'Action':
ComponentType.LIBRARY]
return p.add_argument('--mc-type',
metavar='<type>',
help='Type of the main component'
help='Type of the main component.'
f' {{choices: {", ".join(t.value for t in choices)}}}'
' (default: %(default)s)',
dest='mc_type',
Expand Down
40 changes: 20 additions & 20 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,31 +76,31 @@ The full documentation can be issued by running with ``environment --help``:
Enable license text gathering.
--pyproject <file> Path to the root component's `pyproject.toml` file.
This should point to a file compliant with PEP 621 (storing project metadata).
--mc-type <type> Type of the main component
--mc-type <type> Type of the main component.
{choices: application, firmware, library}
(default: application)
--short-PURLs Omit all qualifiers from PackageURLs.
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
--schema-version <version>
DEPRECATED alias for "--spec-version"
--sv <version>, --spec-version <version>
The CycloneDX schema version for your SBOM
Which version of CycloneDX to use.
{choices: 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1.0}
(default: 1.5)
--output-reproducible
Whether to go the extra mile and make the output reproducible.
This might result in loss of time- and random-based-values.
--of <format>, --output-format <format>
The output format for your SBOM
Which output format to use.
{choices: JSON, XML}
(default: JSON)
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
Path to the output file.
(set to "-" to output to STDOUT)
(default: -)
--validate, --no-validate
Whether validate the result before outputting
Whether to validate resulting BOM before outputting.
(default: True)
-v, --verbose Increase the verbosity of messages
(multiple for more effect)
Expand Down Expand Up @@ -250,31 +250,31 @@ The full documentation can be issued by running with ``pipenv --help``:
[env var: PIPENV_PYPI_MIRROR]
--pyproject <file> Path to the root component's `pyproject.toml` file.
This should point to a file compliant with PEP 621 (storing project metadata).
--mc-type <type> Type of the main component
--mc-type <type> Type of the main component.
{choices: application, firmware, library}
(default: application)
--short-PURLs Omit all qualifiers from PackageURLs.
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
--schema-version <version>
DEPRECATED alias for "--spec-version"
--sv <version>, --spec-version <version>
The CycloneDX schema version for your SBOM
Which version of CycloneDX to use.
{choices: 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1.0}
(default: 1.5)
--output-reproducible
Whether to go the extra mile and make the output reproducible.
This might result in loss of time- and random-based-values.
--of <format>, --output-format <format>
The output format for your SBOM
Which output format to use.
{choices: JSON, XML}
(default: JSON)
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
Path to the output file.
(set to "-" to output to STDOUT)
(default: -)
--validate, --no-validate
Whether validate the result before outputting
Whether to validate resulting BOM before outputting.
(default: True)
-v, --verbose Increase the verbosity of messages
(multiple for more effect)
Expand Down Expand Up @@ -328,31 +328,31 @@ The full documentation can be issued by running with ``poetry --help``:
(multiple values allowed)
--all-extras Include all extra dependencies
(default: False)
--mc-type <type> Type of the main component
--mc-type <type> Type of the main component.
{choices: application, firmware, library}
(default: application)
--short-PURLs Omit all qualifiers from PackageURLs.
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
--schema-version <version>
DEPRECATED alias for "--spec-version"
--sv <version>, --spec-version <version>
The CycloneDX schema version for your SBOM
Which version of CycloneDX to use.
{choices: 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1.0}
(default: 1.5)
--output-reproducible
Whether to go the extra mile and make the output reproducible.
This might result in loss of time- and random-based-values.
--of <format>, --output-format <format>
The output format for your SBOM
Which output format to use.
{choices: JSON, XML}
(default: JSON)
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
Path to the output file.
(set to "-" to output to STDOUT)
(default: -)
--validate, --no-validate
Whether validate the result before outputting
Whether to validate resulting BOM before outputting.
(default: True)
-v, --verbose Increase the verbosity of messages
(multiple for more effect)
Expand Down Expand Up @@ -402,31 +402,31 @@ The full documentation can be issued by running with ``requirements --help``:
Should follow the same rules as --index-url
--pyproject <file> Path to the root component's `pyproject.toml` file.
This should point to a file compliant with PEP 621 (storing project metadata).
--mc-type <type> Type of the main component
--mc-type <type> Type of the main component.
{choices: application, firmware, library}
(default: application)
--short-PURLs Omit all qualifiers from PackageURLs.
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
--schema-version <version>
DEPRECATED alias for "--spec-version"
--sv <version>, --spec-version <version>
The CycloneDX schema version for your SBOM
Which version of CycloneDX to use.
{choices: 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1.0}
(default: 1.5)
--output-reproducible
Whether to go the extra mile and make the output reproducible.
This might result in loss of time- and random-based-values.
--of <format>, --output-format <format>
The output format for your SBOM
Which output format to use.
{choices: JSON, XML}
(default: JSON)
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
Path to the output file.
(set to "-" to output to STDOUT)
(default: -)
--validate, --no-validate
Whether validate the result before outputting
Whether to validate resulting BOM before outputting.
(default: True)
-v, --verbose Increase the verbosity of messages
(multiple for more effect)
Expand Down