mirror of
https://github.com/mikaela/mikaela.github.io/
synced 2025-10-24 20:17:21 +02:00
2.9 KiB
2.9 KiB
REUSE notes
Automaattinen sisällysluettelo / Automatically generated Table of Contents
reuse is a tool for compliance with the REUSE recommendations.
says their GitHub
description 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
Adding headers
Copy-paste and add file name(s) to the end
# Autodetect how to add comment?
reuse annotate --copyright="Aminda Suomalainen <{{ site.email }}>" --license="CC0-1.0"
# Create a file.license
reuse annotate --copyright="Aminda Suomalainen <{{ site.email }}>" --license="CC0-1.0" --force-dot-license
# The usual # marks a comment
reuse annotate --copyright="Aminda Suomalainen <{{ site.email }}>" --license="CC0-1.0" --style pythonNote!
--year 2023can be specified if the date isn’t this year.annotatereplaces existing headeer if any, to add before it instead, use--no-replace
Styles
cmeans//marks a commentpythonmeans#marks a commenthtmlandcssexplain themselvestexmeans%marks a commentvimmeans"marks a comment- etc. when
styleis empty, supported ones are displayed, but I am unsure whether I need more and trying whatreusesays works too.
Generic commands
reuse download --all- downloads all licenses found toLICENSES/reuse lint- verifies compliancyreuse supported-licenses | less- lists supported licenses identifiersreuse convert-dep5to fix deprecation warning about.reuse/dep5/reuse.toml
Development version
pipx install "git+https://github.com/fsfe/reuse-tool.git"
License identifiers I commonly use
CC0-1.0CC-BY-4.0CC-BY-ND-4.0CC-BY-SA-4.0BSD-3-ClauseEUPL-1.2
See also SPDX License List
Viewing source of this page reveals this one to be CC-BY-SA-4.0.