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
48 changes: 24 additions & 24 deletions cyclonedx_py/_internal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,6 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar
action='store_true',
dest='short_purls',
default=False)
op.add_argument('--outfile', # DEPRECATED
metavar='<file>',
help='DEPRECATED alias for "--output-file".',
type=FileType('wt', encoding='utf8'),
dest='output_file',
default=OPTION_OUTPUT_STDOUT)
op.add_argument('-o', '--output-file',
metavar='<file>',
help='Output file path for your SBOM'
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)
op.add_argument('--schema-version', # DEPRECATED
metavar='<version>',
help='DEPRECATED alias for option "--spec-version".',
Expand All @@ -100,27 +86,41 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar
op.add_argument('--sv', '--spec-version',
metavar='<version>',
help='The CycloneDX spec version for your SBOM'
f' {{choices: {", ".join(sorted((v.to_version() for v in SchemaVersion), reverse=True))}}}'
' (default: %(default)s)',
f' {{choices: {", ".join(sorted((v.to_version() for v in SchemaVersion), reverse=True))}}}'
' (default: %(default)s)',
dest='spec_version',
choices=SchemaVersion,
type=SchemaVersion.from_version,
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.',
action='store_true',
dest='output_reproducible',
default=False)
op.add_argument('--of', '--output-format',
metavar='<format>',
help='The output format for your SBOM'
f' {choices4enum(OutputFormat)}'
' (default: %(default)s)',
f' {choices4enum(OutputFormat)}'
' (default: %(default)s)',
dest='output_format',
choices=OutputFormat,
type=argparse_type4enum(OutputFormat),
default=OutputFormat.JSON.name)
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.',
action='store_true',
dest='output_reproducible',
default=False)
op.add_argument('--outfile', # DEPRECATED
metavar='<file>',
help='DEPRECATED alias for "--output-file".',
type=FileType('wt', encoding='utf8'),
dest='output_file',
default=OPTION_OUTPUT_STDOUT)
op.add_argument('-o', '--output-file',
metavar='<file>',
help='Output file path for your SBOM'
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'
Expand Down
64 changes: 32 additions & 32 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,24 @@ The full documentation can be issued by running with ``environment --help``:
(default: application)
--short-PURLs Omit all qualifiers from PackageURLs.
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
(set to "-" to output to STDOUT)
(default: -)
--schema-version <version>
DEPRECATED alias for "--spec-version"
--sv <version>, --spec-version <version>
The CycloneDX schema version for your SBOM
{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
{choices: JSON, XML}
(default: JSON)
--output-reproducible
Whether to go the extra mile and make the output reproducible.
This might result in loss of time- and random-based-values.
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
(set to "-" to output to STDOUT)
(default: -)
--validate, --no-validate
Whether validate the result before outputting
(default: True)
Expand Down Expand Up @@ -255,24 +255,24 @@ The full documentation can be issued by running with ``pipenv --help``:
(default: application)
--short-PURLs Omit all qualifiers from PackageURLs.
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
(set to "-" to output to <stdout>)
(default: -)
--schema-version <version>
DEPRECATED alias for "--spec-version"
--sv <version>, --spec-version <version>
The CycloneDX schema version for your SBOM
{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
{choices: JSON, XML}
(default: JSON)
--output-reproducible
Whether to go the extra mile and make the output reproducible.
This might result in loss of time- and random-based-values.
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
(set to "-" to output to STDOUT)
(default: -)
--validate, --no-validate
Whether validate the result before outputting
(default: True)
Expand Down Expand Up @@ -333,24 +333,24 @@ The full documentation can be issued by running with ``poetry --help``:
(default: application)
--short-PURLs Omit all qualifiers from PackageURLs.
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
(set to "-" to output to <stdout>)
(default: -)
--schema-version <version>
DEPRECATED alias for "--spec-version"
--sv <version>, --spec-version <version>
The CycloneDX schema version for your SBOM
{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
{choices: JSON, XML}
(default: JSON)
--output-reproducible
Whether to go the extra mile and make the output reproducible.
This might result in loss of time- and random-based-values.
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
(set to "-" to output to STDOUT)
(default: -)
--validate, --no-validate
Whether validate the result before outputting
(default: True)
Expand Down Expand Up @@ -407,24 +407,24 @@ The full documentation can be issued by running with ``requirements --help``:
(default: application)
--short-PURLs Omit all qualifiers from PackageURLs.
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
(set to "-" to output to <stdout>)
(default: -)
--schema-version <version>
DEPRECATED alias for "--spec-version"
--sv <version>, --spec-version <version>
The CycloneDX schema version for your SBOM
{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
{choices: JSON, XML}
(default: JSON)
--output-reproducible
Whether to go the extra mile and make the output reproducible.
This might result in loss of time- and random-based-values.
--outfile <file> DEPRECATED alias for "--output-file".
-o <file>, --output-file <file>
Output file path for your SBOM
(set to "-" to output to STDOUT)
(default: -)
--validate, --no-validate
Whether validate the result before outputting
(default: True)
Expand Down