proposal for templates for variability in SPDX licenses
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aal
agpl-1.0
apache-1.0
apache-1.1
bsd-2-clause-netbsd
bsd-2-clause
bsd-3-clause-clear
bsd-3-clause
bsd-4-clause
ecl-1.0
fair
lpl-1.0
mpl-1.0
nasa-1.3
ncsa
ntp
tools
README.org
todo.org

README.org

A proposal for templatization of SPDX licenses.

Introduction

Certain sections of a license vary as they are used. Some of this variability is by design (think of the BSD family of licenses). In other cases it is due to small changes in licenses as they are copied and propagated.

Rules

A variable section of a license is specified with a rule. A rule is wrapped between {{}} and is composed of 5 parts. Each is separated with ;. They cannot be embedded within other rules.

  • original: the original text of the rule. It should be the first field. It is required.
  • match: a POSIX regular expression (semicolons are escaped with \; within it). This field is required.
  • name: name of the field in the template. Each rule must have a name. This field is required.
  • type: required or optional. This field is required.
  • example: another example of the use of the text. This field is optional.

Example:

{{original=THE AUTHOR OR CONTRIBUTORS;match=.+;name=copyrightHolderLiability;type=required;example=dmg inc.}}

This matches the regular expression .+ /”any character at least once”. It is /required, its name is copyrightHolderLiability and an example of the use of the rule is the text THE AUTHOR OR CONTRIBUTORS.

Contact

Comments, patches, suggestions to Daniel German, dmg@uvic.ca