Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation of subcommands #1083

Merged
merged 2 commits into from
Sep 30, 2024
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
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 @@ -163,12 +163,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 @@ -180,6 +187,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 @@ -188,6 +203,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 @@ -196,6 +214,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 @@ -205,6 +226,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
Loading