Skip to content

Commit

Permalink
Merge pull request #1083 from carmenbianca/fix-doc-subcommands
Browse files Browse the repository at this point in the history
Improve documentation of subcommands
  • Loading branch information
carmenbianca authored Sep 30, 2024
2 parents a5d2b10 + d9f18b3 commit 91c34fb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,11 @@ short summary:
- `annotate` --- Add copyright and/or licensing information to the header of a
file.
- `download` --- Download the specified license into the `LICENSES/` directory.
- `init` --- Set up the project for REUSE compliance.
- `lint` --- Verify the project for REUSE compliance.
- `lint-file` --- Verify REUSE compliance of individual files.
- `spdx` --- Generate an SPDX Document of all files in the project.
- `supported-licenses` --- Prints all licenses supported by REUSE.
- `convert-dep5` --- Convert .reuse/dep5 to REUSE.toml.

### Example demo

Expand Down
28 changes: 28 additions & 0 deletions src/reuse/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,19 @@ def parser() -> argparse.ArgumentParser:
"- Are there any bad (unrecognised, not compliant with SPDX)"
" licenses in the project?\n"
"\n"
"- Are there any deprecated licenses in the project?\n"
"\n"
"- Are there any license files in the LICENSES/ directory"
" without file extension?\n"
"\n"
"- Are any licenses referred to inside of the project, but"
" not included in the LICENSES/ directory?\n"
"\n"
"- Are any licenses included in the LICENSES/ directory that"
" are not used inside of the project?\n"
"\n"
"- Are there any read errors?\n"
"\n"
"- Do all files have valid copyright and licensing"
" information?"
).format(reuse_version=__REUSE_version__)
Expand All @@ -190,6 +197,14 @@ def parser() -> argparse.ArgumentParser:
"lint-file",
_lint_file.add_arguments,
_lint_file.run,
description=fill_all(
_(
"Lint individual files. The specified files are checked for"
" the presence of copyright and licensing information, and"
" whether the found licenses are included in the LICENSES/"
" directory."
)
),
help=_("list non-compliant files from specified list of files"),
)

Expand All @@ -198,6 +213,9 @@ def parser() -> argparse.ArgumentParser:
"spdx",
spdx.add_arguments,
spdx.run,
description=fill_all(
_("Generate an SPDX bill of materials in RDF format.")
),
help=_("print the project's bill of materials in SPDX format"),
)

Expand All @@ -206,6 +224,9 @@ def parser() -> argparse.ArgumentParser:
"supported-licenses",
supported_licenses.add_arguments,
supported_licenses.run,
description=fill_all(
_("List all non-deprecated SPDX licenses from the official list.")
),
help=_("list all supported SPDX licenses"),
aliases=["supported-licences"],
)
Expand All @@ -215,6 +236,13 @@ def parser() -> argparse.ArgumentParser:
"convert-dep5",
convert_dep5.add_arguments,
convert_dep5.run,
description=fill_all(
_(
"Convert .reuse/dep5 into a REUSE.toml file in your project"
" root. The generated file is semantically identical. The"
" .reuse/dep5 file is subsequently deleted."
)
),
help=_("convert .reuse/dep5 to REUSE.toml"),
)

Expand Down

0 comments on commit 91c34fb

Please sign in to comment.