You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: csdb/v4.16/docs/CollectionFormat.md
+63-3Lines changed: 63 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ The collection is organised as a set of categories, each of which contains one o
6
6
7
7
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.
8
8
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.
10
10
11
11
All the files are plain text, encoded in UTF-8 format with UTF-8 preamble (BOM).
12
12
@@ -249,12 +249,70 @@ The credits files are not referenced by, and do not reference, any of the other
249
249
250
250
## License File
251
251
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
253
255
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.
255
257
256
258
The `LICENSE` file is not referenced by, and does not reference, any of the other files in the collection.
257
259
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 "and contributors"<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
+
258
316
## Version Information File
259
317
260
318
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
270
328
<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>`.
271
329
272
330
<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