Skip to content

Commit 5452201

Browse files
author
delphidabbler
committed
Documented format of LICENSE-INFO file.
1 parent cd21378 commit 5452201

File tree

1 file changed

+63
-3
lines changed

1 file changed

+63
-3
lines changed

csdb/v4.16/docs/CollectionFormat.md

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The collection is organised as a set of categories, each of which contains one o
66

77
Meta data describing the categories and snippets is stored in a set of `.ini` files. In addition there are numerous `.dat` files, each of which contains the source code of a snippet.
88

9-
Finally there are also plain text files containing the source code license, version information and lists of credits.
9+
There are additional files containing the source code license information, version information and lists of credits.
1010

1111
All the files are plain text, encoded in UTF-8 format with UTF-8 preamble (BOM).
1212

@@ -249,12 +249,70 @@ The credits files are not referenced by, and do not reference, any of the other
249249

250250
## License File
251251

252-
This is a plain UTF-8 text file named `LICENSE` that contains the license that applies to the source code in the collection.
252+
There are two files relating to license (and copyright) information: the full text of the license in human readable format and a file providing machine readable meta data about the license and copyright.
253+
254+
### Full License Text
253255

254-
The exception is that any source code file may contains license information in comments. Such a license overrides that in the `LICENSE` file.
256+
This is a plain UTF-8 text file named `LICENSE` that contains the license that applies to the source code in the collection.
255257

256258
The `LICENSE` file is not referenced by, and does not reference, any of the other files in the collection.
257259

260+
### License Meta Information
261+
262+
A file named `LICENSE-INFO` is provided that contains information about the license in machine readable form. Information is in Key=Value format as follows:
263+
264+
```
265+
LicenseName=<human-readable-name>
266+
LicenseSPDX=<code>
267+
LicenseURL=<url>
268+
CopyrightDate=<date-range>
269+
CopyrightHolder=<name>
270+
CopyrightHolderURL=<url>
271+
```
272+
273+
The keys have the following meaning:
274+
275+
<dl>
276+
<dt>
277+
LicenseName
278+
</dt>
279+
<dd>
280+
The name of the license as plain text. E.g. <code>MIT License</code> or <code>Mozilla Public License 2.0</code>.
281+
</dd>
282+
<dt>
283+
LicenseSPDX
284+
</dt>
285+
<dd>
286+
The Open Source Initiative (OSI) SPDX short identifier of the license, if any. E.g. <const>MIT</const> or <const>MPL-2.0</const>. If the license does not have a SPDX identifier this key <em>must</em> either be omitted or be empty. For a list of OSI licenses with their SPDXs see <a href="https://opensource.org/licenses/alphabetical">https://opensource.org/licenses/alphabetical</a>.
287+
</dd>
288+
<dt>
289+
LicenseURL
290+
</dt>
291+
<dd>
292+
The URL of an online copy of the license. E.g. <code>https://opensource.org/licenses/MIT</code>. If the license has no URL then this key <em>must</em> be omitted or be empty.
293+
</dd>
294+
<dt>
295+
CopyrightDate
296+
</dt>
297+
<dd>
298+
The date of the copyright or range of copyright dates as plain text. E.g. <code>2020</code> or <code>2005-2020</code>.
299+
</dd>
300+
<dt>
301+
CopyrightHolder
302+
</dt>
303+
<dd>
304+
The name of the copyright holder as plain text. Where there are contributors either list them all or append &quot;and contributors&quot;<sup> 4</sup> to the primary copyright holder's name. E.g. <code>Joe Bloggs</code> or <code>Annie Smith, Joe Bloggs and Jessie Sharp</code> or <code>Annie Smith and Contributors</code>.
305+
</dd>
306+
<dt>
307+
CopyrightHolderURL
308+
</dt>
309+
<dd>
310+
The URL of a web page where details of the copyright holder(s) or primary copyright holder can be found. E.g. <code>https://example.com/joe-blogs-bio</code>. This key is optional.
311+
</dd>
312+
</dl>
313+
314+
The `LICENSE-INFO` file is not referenced by, and does not reference, any of the other files in the collection.
315+
258316
## Version Information File
259317

260318
There is a plain UTF-8 text file named `VERSION` that contains the version number of the database. The current major version is v2.
@@ -270,3 +328,5 @@ The `VERSION` file is not referenced by, and does not reference, any of the othe
270328
<sup>**2**</sup> Here is an example of how the <em>Credits</em> and <em>Credits_URL</em> key values in the individual category `.ini` files are used. If <em>Credits</em>="`See [example]`" and <em>Credits_URL</em>="`http://example.com</em>`" and the <em>Extra</em>key is empty or missing then the extra text generated will be `See <a href="example.com">example 1</a>`.
271329

272330
<sup>**3**</sup> Version tracking was not done before v2.0.0. However it is safe to assume, using semantic versioning, that the current format is the second major release. This is because all previous database versions were backwards compatible and therefore all belonged to the same major version, which, logically, must have been v1. The fact that this version of the database breaks that backward compatibility means the major version must be bumped.
331+
332+
<sup>**4**</sup> If "contributors" is specified as part of the *CopyrightHolder* key value in `LICENSE-INFO` then the `CONTRIBUTORS` file *must* contain a list of all the contributors.

0 commit comments

Comments
 (0)