Jonas Stein
Jonas Stein

Reputation: 7043

Add year of creation in the copyright header of each file with reuse

A git repository has many files and each file should get a SPDX license header. The license header should be created by reuse and use the year of creation as year in the copyright.

example of what I want to get:  

$> head -v -n1 *.py       # Prints first line of each file

==> made_on_2006-01-01.py  <==
# SPDX-FileCopyrightText: 2006 Bob Doe <[email protected]>

==> made_on_2012-02-02.py  <==
# SPDX-FileCopyrightText: 2012 Alice Doe <[email protected]>

==> made_on_2020-03-03.py  <==
# SPDX-FileCopyrightText: 2020 Bob Doe <[email protected]>

How can I create these headers with reuse, git and standard command line tools on Linux?

I think this is useful for projects with a single coder where you want to note the copyright with the first day of file creation.

Upvotes: 0

Views: 517

Answers (0)

Related Questions