Skip to content

interfacerproject/reuse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About the project

This project is intented to be used with Interfacer projects to apply appropriate licensing information on all files of a project.

Usage

The usage is very human. You include this repository as a submodule to your project as the path .reuse. This can be achieved by running:

git submodule add https://github.com/interfacerproject/reuse .reuse

Then, you can commit and push your changes, such as:

git commit -m 'add reuse support'
git push

After you include the repository, you can use the Reuse tool with the provided templates.

Annotating all files

With this repository included into your project, run the sh(1) script:

.reuse/annotate -y2022-2023 src/*.c doc/*.md

from your project working directory with parameters you want to supply to the Reuse tool.

Most oftenly, you'll only need to supply the year and the files to be annotated. The year is supplied either with -y or --year, which can take a list of comma-seprated years, range of years, or a year.

You can supply -r or --recursive to recursively annotate a directory, which can be the current directory, ., as well. Using this might result in mismatches with the Reuse tool if it can't detect the file type of a file. In that case, you can supply the --skip-unrecognised flag to skip those files temporarily, and then annotate them separately with -s or --style option, which takes an argument such as c, css, or python. The possible style options can be optained by running -h or --help.

In this example:

.reuse/annotate -y2023 -spython scripts/sh-script-without-extension

-s uses Python-style comments on a shell script without an extension.

The script works as long as it is relatively referenced, since it uses your current working directory when called to locate the files.

Downloading the licenses

After you annotated all your files, you must run

.reuse/download

to download all the licenses used in your project. This will create a LICENSES/ directory and put all the downloaded licenses there. After this step is done, you should remove any individual LICENSE file found in your project root.

Then, you should be all good to go and comply with the Reuse spec. To verify that, you can run:

    .reuse/lint

which will tell you any errors if they're present.

About

Reuse templates for the Interfacer project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages