2023-03-10 08:29:38 +01:00
|
|
|
---
|
2024-05-18 18:58:57 +02:00
|
|
|
layout: mini
|
2023-03-10 08:29:38 +01:00
|
|
|
permalink: /n/reuse.html
|
|
|
|
sitemap: false
|
|
|
|
email: "suomalainen+git@mikaela.info"
|
2024-05-30 08:05:52 +02:00
|
|
|
lang: en
|
2023-03-10 08:29:38 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: 2023 Free Software Foundation Europe e.V.
|
|
|
|
SPDX-FileCopyrightText: 2023 Aminda Suomalainen <suomalainen+git@mikaela.info>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: CC-BY-SA-4.0
|
|
|
|
-->
|
|
|
|
|
|
|
|
# REUSE notes
|
|
|
|
|
2024-05-29 10:18:10 +02:00
|
|
|
<!-- editorconfig-checker-disable -->
|
|
|
|
<!-- prettier-ignore-start -->
|
|
|
|
|
2023-04-28 07:23:46 +02:00
|
|
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
|
|
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
2024-05-30 08:05:52 +02:00
|
|
|
<em lang="fi">Automaattinen sisällysluettelo</em> / <em lang="en">Automatically generated Table of Contents</em>
|
2023-04-28 07:23:46 +02:00
|
|
|
|
|
|
|
- [Adding headers](#adding-headers)
|
|
|
|
- [Styles](#styles)
|
|
|
|
- [Generic commands](#generic-commands)
|
2024-05-30 08:46:10 +02:00
|
|
|
- [Development version](#development-version)
|
2023-04-28 07:23:46 +02:00
|
|
|
- [License identifiers I commonly use](#license-identifiers-i-commonly-use)
|
|
|
|
|
|
|
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
|
|
|
2024-05-29 10:18:10 +02:00
|
|
|
<!-- prettier-ignore-end -->
|
|
|
|
<!-- editorconfig-checker-enable -->
|
|
|
|
|
2023-03-10 08:29:38 +01:00
|
|
|
> reuse is a tool for compliance with the REUSE recommendations.
|
|
|
|
|
|
|
|
says [their GitHub description](https://github.com/fsfe/reuse-tool) and
|
|
|
|
in practice this means having a license header in all files or alternatively
|
|
|
|
a `file.license` file. The tool can generate these, but I never remember
|
|
|
|
the commands.
|
|
|
|
|
|
|
|
For more detailed explanation, consult [reuse.software/tutorial](https://reuse.software/tutorial/)
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## Adding headers
|
|
|
|
|
|
|
|
Copy-paste and add file name(s) to the end
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# Autodetect how to add comment?
|
2023-05-09 11:18:55 +02:00
|
|
|
reuse annotate --copyright="Aminda Suomalainen <{{ page.email }}>" --license="CC0-1.0"
|
2023-03-10 08:29:38 +01:00
|
|
|
# Create a file.license
|
2023-05-09 11:18:55 +02:00
|
|
|
reuse annotate --copyright="Aminda Suomalainen <{{ page.email }}>" --license="CC0-1.0" --force-dot-license
|
2023-03-10 08:29:38 +01:00
|
|
|
# The usual # marks a comment
|
2023-05-09 11:18:55 +02:00
|
|
|
reuse annotate --copyright="Aminda Suomalainen <{{ page.email }}>" --license="CC0-1.0" --style python
|
2023-03-10 08:29:38 +01:00
|
|
|
```
|
|
|
|
|
2023-05-09 11:18:55 +02:00
|
|
|
Note!
|
|
|
|
|
|
|
|
- `--year 2023` can be specified if the date isn't this year.
|
|
|
|
- `annotate` replaces existing headeer if any, to add before it instead, use
|
|
|
|
`--no-replace`
|
2023-03-10 08:29:38 +01:00
|
|
|
|
|
|
|
### Styles
|
|
|
|
|
|
|
|
- `c` means `//` marks a comment
|
|
|
|
- `python` means `#` marks a comment
|
|
|
|
- `html` and `css` explain themselves
|
|
|
|
- `tex` means `%` marks a comment
|
|
|
|
- `vim` means `"` marks a comment
|
|
|
|
- etc. when `style` is empty, supported ones are displayed, but I am unsure
|
|
|
|
whether I need more and trying what `reuse` says works too.
|
|
|
|
|
|
|
|
## Generic commands
|
|
|
|
|
|
|
|
- `reuse download --all` - downloads all licenses found to `LICENSES/`
|
|
|
|
- `reuse lint` - verifies compliancy
|
|
|
|
- `reuse supported-licenses | less` - lists supported licenses identifiers
|
2024-05-30 08:46:10 +02:00
|
|
|
- `reuse convert-dep5` to fix deprecation warning about
|
|
|
|
`.reuse/dep5`/`reuse.toml`
|
|
|
|
|
|
|
|
## Development version
|
|
|
|
|
|
|
|
- `pipx install "git+https://github.com/fsfe/reuse-tool.git"`
|
2023-03-10 08:29:38 +01:00
|
|
|
|
|
|
|
## License identifiers I commonly use
|
|
|
|
|
|
|
|
- `CC0-1.0`
|
|
|
|
- `CC-BY-4.0`
|
|
|
|
- `CC-BY-ND-4.0`
|
|
|
|
- `CC-BY-SA-4.0`
|
|
|
|
- `BSD-3-Clause`
|
2024-03-24 07:26:17 +01:00
|
|
|
- `EUPL-1.2`
|
|
|
|
|
|
|
|
See also [SPDX License List](https://spdx.org/licenses/)
|
2023-03-10 08:29:38 +01:00
|
|
|
|
|
|
|
_Viewing source of this page reveals this one to be CC-BY-SA-4.0._
|