Skip to content

Commit 3c86517

Browse files
authored
docs: reword common CLI switches (#877)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent f700e5f commit 3c86517

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

cyclonedx_py/_internal/cli.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar
8585
default=SchemaVersion.V1_5.to_version())
8686
op.add_argument('--sv', '--spec-version',
8787
metavar='<version>',
88-
help='The CycloneDX spec version for your SBOM'
88+
help='Which version of CycloneDX to use.'
8989
f' {{choices: {", ".join(sorted((v.to_version() for v in SchemaVersion), reverse=True))}}}'
9090
' (default: %(default)s)',
9191
dest='spec_version',
@@ -94,13 +94,13 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar
9494
default=SchemaVersion.V1_5.to_version())
9595
op.add_argument('--output-reproducible',
9696
help='Whether to go the extra mile and make the output reproducible.\n'
97-
'This might result in loss of time- and random-based-values.',
97+
'This might result in loss of time- and random-based values.',
9898
action='store_true',
9999
dest='output_reproducible',
100100
default=False)
101101
op.add_argument('--of', '--output-format',
102102
metavar='<format>',
103-
help='The output format for your SBOM'
103+
help='Which output format to use.'
104104
f' {choices4enum(OutputFormat)}'
105105
' (default: %(default)s)',
106106
dest='output_format',
@@ -115,29 +115,29 @@ def make_argument_parser(cls, sco: ArgumentParser, **kwargs: Any) -> ArgumentPar
115115
default=OPTION_OUTPUT_STDOUT)
116116
op.add_argument('-o', '--output-file',
117117
metavar='<file>',
118-
help='Output file path for your SBOM'
118+
help='Path to the output file.'
119119
f' (set to "{OPTION_OUTPUT_STDOUT}" to output to <stdout>)'
120120
' (default: %(default)s)',
121121
type=FileType('wt', encoding='utf8'),
122122
dest='output_file',
123123
default=OPTION_OUTPUT_STDOUT)
124124
if BooleanOptionalAction:
125125
op.add_argument('--validate',
126-
help='Whether validate the result before outputting'
126+
help='Whether to validate resulting BOM before outputting.'
127127
' (default: %(default)s)',
128128
action=BooleanOptionalAction,
129129
dest='should_validate',
130130
default=True)
131131
else:
132132
vg = op.add_mutually_exclusive_group()
133133
vg.add_argument('--validate',
134-
help='Validate the result before outputting'
134+
help='Validate resulting BOM before outputting.'
135135
' (default: %(default)s)',
136136
action='store_true',
137137
dest='should_validate',
138138
default=True)
139139
vg.add_argument('--no-validate',
140-
help='Do not validate the result before outputting',
140+
help='Disable validation of resulting BOM.',
141141
dest='should_validate',
142142
action='store_false')
143143

cyclonedx_py/_internal/cli_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def add_argument_mc_type(p: 'ArgumentParser') -> 'Action':
4242
ComponentType.LIBRARY]
4343
return p.add_argument('--mc-type',
4444
metavar='<type>',
45-
help='Type of the main component'
45+
help='Type of the main component.'
4646
f' {{choices: {", ".join(t.value for t in choices)}}}'
4747
' (default: %(default)s)',
4848
dest='mc_type',

docs/usage.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -76,31 +76,31 @@ The full documentation can be issued by running with ``environment --help``:
7676
Enable license text gathering.
7777
--pyproject <file> Path to the root component's `pyproject.toml` file.
7878
This should point to a file compliant with PEP 621 (storing project metadata).
79-
--mc-type <type> Type of the main component
79+
--mc-type <type> Type of the main component.
8080
{choices: application, firmware, library}
8181
(default: application)
8282
--short-PURLs Omit all qualifiers from PackageURLs.
8383
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
8484
--schema-version <version>
8585
DEPRECATED alias for "--spec-version"
8686
--sv <version>, --spec-version <version>
87-
The CycloneDX schema version for your SBOM
87+
Which version of CycloneDX to use.
8888
{choices: 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1.0}
8989
(default: 1.5)
9090
--output-reproducible
9191
Whether to go the extra mile and make the output reproducible.
9292
This might result in loss of time- and random-based-values.
9393
--of <format>, --output-format <format>
94-
The output format for your SBOM
94+
Which output format to use.
9595
{choices: JSON, XML}
9696
(default: JSON)
9797
--outfile <file> DEPRECATED alias for "--output-file".
9898
-o <file>, --output-file <file>
99-
Output file path for your SBOM
99+
Path to the output file.
100100
(set to "-" to output to STDOUT)
101101
(default: -)
102102
--validate, --no-validate
103-
Whether validate the result before outputting
103+
Whether to validate resulting BOM before outputting.
104104
(default: True)
105105
-v, --verbose Increase the verbosity of messages
106106
(multiple for more effect)
@@ -250,31 +250,31 @@ The full documentation can be issued by running with ``pipenv --help``:
250250
[env var: PIPENV_PYPI_MIRROR]
251251
--pyproject <file> Path to the root component's `pyproject.toml` file.
252252
This should point to a file compliant with PEP 621 (storing project metadata).
253-
--mc-type <type> Type of the main component
253+
--mc-type <type> Type of the main component.
254254
{choices: application, firmware, library}
255255
(default: application)
256256
--short-PURLs Omit all qualifiers from PackageURLs.
257257
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
258258
--schema-version <version>
259259
DEPRECATED alias for "--spec-version"
260260
--sv <version>, --spec-version <version>
261-
The CycloneDX schema version for your SBOM
261+
Which version of CycloneDX to use.
262262
{choices: 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1.0}
263263
(default: 1.5)
264264
--output-reproducible
265265
Whether to go the extra mile and make the output reproducible.
266266
This might result in loss of time- and random-based-values.
267267
--of <format>, --output-format <format>
268-
The output format for your SBOM
268+
Which output format to use.
269269
{choices: JSON, XML}
270270
(default: JSON)
271271
--outfile <file> DEPRECATED alias for "--output-file".
272272
-o <file>, --output-file <file>
273-
Output file path for your SBOM
273+
Path to the output file.
274274
(set to "-" to output to STDOUT)
275275
(default: -)
276276
--validate, --no-validate
277-
Whether validate the result before outputting
277+
Whether to validate resulting BOM before outputting.
278278
(default: True)
279279
-v, --verbose Increase the verbosity of messages
280280
(multiple for more effect)
@@ -328,31 +328,31 @@ The full documentation can be issued by running with ``poetry --help``:
328328
(multiple values allowed)
329329
--all-extras Include all extra dependencies
330330
(default: False)
331-
--mc-type <type> Type of the main component
331+
--mc-type <type> Type of the main component.
332332
{choices: application, firmware, library}
333333
(default: application)
334334
--short-PURLs Omit all qualifiers from PackageURLs.
335335
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
336336
--schema-version <version>
337337
DEPRECATED alias for "--spec-version"
338338
--sv <version>, --spec-version <version>
339-
The CycloneDX schema version for your SBOM
339+
Which version of CycloneDX to use.
340340
{choices: 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1.0}
341341
(default: 1.5)
342342
--output-reproducible
343343
Whether to go the extra mile and make the output reproducible.
344344
This might result in loss of time- and random-based-values.
345345
--of <format>, --output-format <format>
346-
The output format for your SBOM
346+
Which output format to use.
347347
{choices: JSON, XML}
348348
(default: JSON)
349349
--outfile <file> DEPRECATED alias for "--output-file".
350350
-o <file>, --output-file <file>
351-
Output file path for your SBOM
351+
Path to the output file.
352352
(set to "-" to output to STDOUT)
353353
(default: -)
354354
--validate, --no-validate
355-
Whether validate the result before outputting
355+
Whether to validate resulting BOM before outputting.
356356
(default: True)
357357
-v, --verbose Increase the verbosity of messages
358358
(multiple for more effect)
@@ -402,31 +402,31 @@ The full documentation can be issued by running with ``requirements --help``:
402402
Should follow the same rules as --index-url
403403
--pyproject <file> Path to the root component's `pyproject.toml` file.
404404
This should point to a file compliant with PEP 621 (storing project metadata).
405-
--mc-type <type> Type of the main component
405+
--mc-type <type> Type of the main component.
406406
{choices: application, firmware, library}
407407
(default: application)
408408
--short-PURLs Omit all qualifiers from PackageURLs.
409409
This causes information loss in trade-off shorter PURLs, which might improve ingesting these strings.
410410
--schema-version <version>
411411
DEPRECATED alias for "--spec-version"
412412
--sv <version>, --spec-version <version>
413-
The CycloneDX schema version for your SBOM
413+
Which version of CycloneDX to use.
414414
{choices: 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1.0}
415415
(default: 1.5)
416416
--output-reproducible
417417
Whether to go the extra mile and make the output reproducible.
418418
This might result in loss of time- and random-based-values.
419419
--of <format>, --output-format <format>
420-
The output format for your SBOM
420+
Which output format to use.
421421
{choices: JSON, XML}
422422
(default: JSON)
423423
--outfile <file> DEPRECATED alias for "--output-file".
424424
-o <file>, --output-file <file>
425-
Output file path for your SBOM
425+
Path to the output file.
426426
(set to "-" to output to STDOUT)
427427
(default: -)
428428
--validate, --no-validate
429-
Whether validate the result before outputting
429+
Whether to validate resulting BOM before outputting.
430430
(default: True)
431431
-v, --verbose Increase the verbosity of messages
432432
(multiple for more effect)

0 commit comments

Comments
 (0)