Skip to content

Commit 8a24b10

Browse files
committed
docs: add list of licenses
1 parent d85a0d7 commit 8a24b10

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
import { licenses } from '@opendatacapture/licenses';
3+
import type { ApprovedLicense } from '@opendatacapture/licenses';
4+
5+
const approvedLicenseIds: ApprovedLicense[] = [
6+
'0BSD',
7+
'Apache-2.0',
8+
'BSD-1-Clause',
9+
'BSD-2-Clause',
10+
'BSD-3-Clause',
11+
'CC0-1.0',
12+
'ISC',
13+
'MIT',
14+
'MIT-0',
15+
'Unlicense',
16+
'WTFPL'
17+
];
18+
19+
const approvedLicenses = Array.from(licenses.entries())
20+
.filter(([id]) => approvedLicenseIds.includes(id as any))
21+
.map(([id, license]) => ({ id, ...license }))
22+
.sort((a, b) => a.name.localeCompare(b.name));
23+
24+
const openSourceNonApprovedLicenses = Array.from(licenses.entries())
25+
.filter(([id, license]) => !approvedLicenseIds.includes(id as any) && license.isOpenSource)
26+
.map(([id, license]) => ({ id, ...license }))
27+
.sort((a, b) => a.name.localeCompare(b.name));
28+
29+
const proprietaryLicenses = Array.from(licenses.entries())
30+
.filter(([id, license]) => !license.isOpenSource)
31+
.map(([id, license]) => ({ id, ...license }))
32+
.sort((a, b) => a.name.localeCompare(b.name));
33+
---
34+
35+
<div class="space-y-8">
36+
<section>
37+
<h3>Licenses Approved for Inclusion in ODC Repository</h3>
38+
<p class="mb-4 text-slate-700">
39+
The following licenses are pre-approved for direct inclusion and public distribution:
40+
</p>
41+
<ul class="tracking-tight">
42+
{
43+
approvedLicenses.map((license) => (
44+
<li>
45+
<a
46+
class="font-bold hover:underline"
47+
target="_blank"
48+
rel="noopener noreferrer"
49+
href={license.reference}
50+
style="text-decoration-line: none;"
51+
>
52+
{license.name}
53+
</a>
54+
</li>
55+
))
56+
}
57+
</ul>
58+
<p class="text-slate-700">Please note that instruments in the public domain instruments are also permitted.</p>
59+
</section>
60+
<section>
61+
<h3>Open Source Licenses (Review Required)</h3>
62+
<p class="mb-4 text-slate-700">
63+
These open source licenses are acceptable for public distribution but require team review before inclusion:
64+
</p>
65+
<ul class="tracking-tight">
66+
{
67+
openSourceNonApprovedLicenses.map((license) => (
68+
<li>
69+
<a
70+
class="font-bold hover:underline"
71+
target="_blank"
72+
rel="noopener noreferrer"
73+
href={license.reference}
74+
style="text-decoration-line: none;"
75+
>
76+
{license.name}
77+
</a>
78+
</li>
79+
))
80+
}
81+
</ul>
82+
</section>
83+
<section>
84+
<h3>Proprietary and Non-Free Licenses</h3>
85+
<p class="mb-4 text-slate-700">
86+
These licenses may not be published publicly by our team. Licenses with commercial use restrictions are considered
87+
non-free, consistent with FSF and OSI definitions:
88+
</p>
89+
<ul class="tracking-tight">
90+
{
91+
proprietaryLicenses.map((license) => (
92+
<li>
93+
<a
94+
class="font-bold hover:underline"
95+
target="_blank"
96+
rel="noopener noreferrer"
97+
href={license.reference}
98+
style="text-decoration-line: none;"
99+
>
100+
{license.name}
101+
</a>
102+
</li>
103+
))
104+
}
105+
</ul>
106+
</section>
107+
</div>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Instrument Licenses
3+
slug: en/docs/reference/instrument-licenses
4+
sidebar:
5+
order: 8
6+
---
7+
8+
import Licenses from '@/components/docs/Licenses.astro';
9+
10+
<Licenses />

0 commit comments

Comments
 (0)