diff --git a/cyclonedx_py/_internal/cli.py b/cyclonedx_py/_internal/cli.py index 8a6108f5..970e3432 100644 --- a/cyclonedx_py/_internal/cli.py +++ b/cyclonedx_py/_internal/cli.py @@ -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='', - 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', @@ -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='', - help='The output format for your SBOM' + help='Which output format to use.' f' {choices4enum(OutputFormat)}' ' (default: %(default)s)', dest='output_format', @@ -115,7 +115,7 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar default=OPTION_OUTPUT_STDOUT) op.add_argument('-o', '--output-file', metavar='', - help='Output file path for your SBOM' + help='Path to the output file.' f' (set to "{OPTION_OUTPUT_STDOUT}" to output to )' ' (default: %(default)s)', type=FileType('wt', encoding='utf8'), @@ -123,7 +123,7 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar 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', @@ -131,13 +131,13 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar 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') diff --git a/cyclonedx_py/_internal/cli_common.py b/cyclonedx_py/_internal/cli_common.py index 57028a31..5daef308 100644 --- a/cyclonedx_py/_internal/cli_common.py +++ b/cyclonedx_py/_internal/cli_common.py @@ -42,7 +42,7 @@ def add_argument_mc_type(p: 'ArgumentParser') -> 'Action': ComponentType.LIBRARY] return p.add_argument('--mc-type', metavar='', - 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', diff --git a/docs/usage.rst b/docs/usage.rst index 66fb140a..85710a04 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -76,7 +76,7 @@ The full documentation can be issued by running with ``environment --help``: Enable license text gathering. --pyproject 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 of the main component + --mc-type Type of the main component. {choices: application, firmware, library} (default: application) --short-PURLs Omit all qualifiers from PackageURLs. @@ -84,23 +84,23 @@ The full documentation can be issued by running with ``environment --help``: --schema-version DEPRECATED alias for "--spec-version" --sv , --spec-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 , --output-format - The output format for your SBOM + Which output format to use. {choices: JSON, XML} (default: JSON) --outfile DEPRECATED alias for "--output-file". -o , --output-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) @@ -250,7 +250,7 @@ The full documentation can be issued by running with ``pipenv --help``: [env var: PIPENV_PYPI_MIRROR] --pyproject 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 of the main component + --mc-type Type of the main component. {choices: application, firmware, library} (default: application) --short-PURLs Omit all qualifiers from PackageURLs. @@ -258,23 +258,23 @@ The full documentation can be issued by running with ``pipenv --help``: --schema-version DEPRECATED alias for "--spec-version" --sv , --spec-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 , --output-format - The output format for your SBOM + Which output format to use. {choices: JSON, XML} (default: JSON) --outfile DEPRECATED alias for "--output-file". -o , --output-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) @@ -328,7 +328,7 @@ 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 of the main component + --mc-type Type of the main component. {choices: application, firmware, library} (default: application) --short-PURLs Omit all qualifiers from PackageURLs. @@ -336,23 +336,23 @@ The full documentation can be issued by running with ``poetry --help``: --schema-version DEPRECATED alias for "--spec-version" --sv , --spec-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 , --output-format - The output format for your SBOM + Which output format to use. {choices: JSON, XML} (default: JSON) --outfile DEPRECATED alias for "--output-file". -o , --output-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) @@ -402,7 +402,7 @@ The full documentation can be issued by running with ``requirements --help``: Should follow the same rules as --index-url --pyproject 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 of the main component + --mc-type Type of the main component. {choices: application, firmware, library} (default: application) --short-PURLs Omit all qualifiers from PackageURLs. @@ -410,23 +410,23 @@ The full documentation can be issued by running with ``requirements --help``: --schema-version DEPRECATED alias for "--spec-version" --sv , --spec-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 , --output-format - The output format for your SBOM + Which output format to use. {choices: JSON, XML} (default: JSON) --outfile DEPRECATED alias for "--output-file". -o , --output-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)