mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-24 01:42:07 -09:00
utils/generate-cyclonedx: improve help text
The argparse has a set of arguments you can pass to the ArgumentParser object to improve the looks of the help message. The example usage used to be defined in the "description" but a "usage" field exists [1]. Also link to the documentation in the epilog [2]. [1] https://docs.python.org/3/library/argparse.html#usage [2] https://docs.python.org/3/library/argparse.html#epilog Signed-off-by: Thomas Perale <thomas.perale@mind.be> Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
358f226809
commit
c13eabf18f
@@ -529,9 +529,9 @@ def br2_root_deps(show_info_dict, virtual=False) -> list:
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description='''Create a CycloneDX SBoM for the Buildroot configuration.
|
||||
Example usage: make show-info | utils/generate-cyclonedx > sbom.json
|
||||
''',
|
||||
description="Create a CycloneDX SBoM for the Buildroot configuration.",
|
||||
usage="make show-info | utils/%(prog)s > sbom.json",
|
||||
epilog="For more information see https://buildroot.org/downloads/manual/manual.html#_generating_cyclonedx_sbom",
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter
|
||||
)
|
||||
parser.add_argument("-i", "--in-file", nargs="?", type=argparse.FileType("r"),
|
||||
|
||||
Reference in New Issue
Block a user