Usage
Installing this package provides you with a reuse-shortcuts CLI executable.
When using this command in a repository, it will look for a file named
.reuse/shortcuts.yaml in the root of the repository. This file is supposed to
have the following format:
<key>:
copyrights: []
years: []
licenses: []
where copyrights, years and licenses are what you would usually add with
reuse annotate --year <year> --copyright <copyright> --license <license [further options], and
<key> is an identifier you define yourself.
Instead of calling the very verbose reuse annotate [...] [further options]
command, you can just run reuse-shortcuts <key> [further options] with the
<key> you defined in the shortcuts.yaml file.
Recommended sections
We recommend that you have at least three different scenarios, one for the
code, one for documentation files and one for supplementary files (e.g.
pyproject.toml), i.e. your shortcuts.yaml file may look like this:
docs:
years: ["2025"]
copyrights: ["Helmholtz-Zentrum hereon GmbH"]
licenses: ["CC-BY-4.0"]
code:
years: ["2025"]
copyrights: ["Helmholtz-Zentrum hereon GmbH"]
licenses: ["GPL-3.0-or-later"]
supp:
years: ["2025"]
copyrights: ["Helmholtz-Zentrum hereon GmbH"]
licenses: ["CC0-1.0"]
When you create a new file named new-file.py and add it to your repo, you can
then just call reuse-shortcuts code new-file.py and you add the necessary
information.
Extra arguments
You can always add any additional argument that are valid for the
reuse annotate command. You may, for instance, add another copyright holder
in that command via
reuse-shortcuts code --copyright 'some one else' new-file.py.